Thank you for taking the time on this, Alnoor. I failed at even the creating the debug script, so I really appreciate the help, and will be able to use this in the future. I even adapted your Left function rather than ""RA_GENERATETRANSACTIONS_UI"" since that didn't work either in my script, and I still can't get this to work for Receipt sales orders, only Xpress sales orders. Do you have any idea why these two act so differently? Here's what I have (and tried as Post- Read, Post-Write, etc):
SP = oSession.StartProgram
If Left(SP,2) = ""RA"" Then
sOrderDate = """" : sOrderDate21 = """" : sShipDate = """" : sMDY = ""%M/%D/%Y""
retVal = oBusObj.GetValue(""OrderDate$"", sOrderDate)
sOrderDate = oSession.FormatDate(sOrderDate, sMDY)
sOrderDate21 = DateAdd(""d"", 21, sOrderDate)
sShipDate = oSession.GetFormattedDate(CStr(sOrderDate21))
retVal = oBusObj.SetValue(""ShipExpireDate$"", sShipDate)
End If