we use a external BOI to maintain sales order memo, to validate attachment file path is valid, below script works for all other memo fields except Attachment. Does SetValue not work on field Attachment?
retChk(oSS.nSetDate("S/O", Today.ToString("yyyyMMdd")), oSS)
retChk(oSS.nSetModule("S/O"), oSS)
Dim obj1= oSS.nLookupTask("SO_SalesOrder_UI")
RetVal = oSS.nSetProgram(obj1)
'set up bus object
soORDER = oPVX.NewObject("SO_SalesOrderMemo_bus", oSS)
'set SalesOrderHeader key: SalesOrderNo
retChk(soORDER.nSetKeyValue("SalesOrderNo$", so_SalesOrderMemo.SalesOrderNo), soORDER)
retChk(soORDER.nSetKeyValue("MemoCode$", so_SalesOrderMemo.MemoCode), soORDER)
retChk(soORDER.nSetKeyValue("SeqNo$", so_SalesOrderMemo.SeqNo), soORDER)
retChk(soORDER.nSetKey(), soORDER)
retChk(soORDER.nSetValue("MemoDesc$", so_SalesOrderMemo.MemoDesc), soORDER)
retChk(soORDER.nSetValue("MemoDate$", so_SalesOrderMemo.MemoDate.ToString("yyyyMMdd")), soORDER)
retChk(soORDER.nSetValue("ExpirationDate$", so_SalesOrderMemo.ExpirationDate.ToString("yyyyMMdd")), soORDER)
retChk(soORDER.nSetValue("ReminderStartDate$", so_SalesOrderMemo.ReminderStartDate.ToString("yyyyMMdd")), soORDER)
retChk(soORDER.nSetValue("ReminderEndDate", so_SalesOrderMemo.ReminderEndDate.ToString("yyyyMMdd")), soORDER)
retChk(soORDER.nSetValue("AutoDisplaySetting$", so_SalesOrderMemo.AutoDisplaySetting), soORDER)
retChk(soORDER.nSetValue("Attachment$", so_SalesOrderMemo.Attachment), soORDER)
retChk(soORDER.nSetValue("MemoText$", so_SalesOrderMemo.MemoText), soORDER)
retChk(soORDER.nWrite(), soORDER)