I'm trying to use a script to store the ShipToAddress1, 2, and 3 field values prior to having a script fire off a button click which does an address validation through a 3rd party plugin. I have the address validation working. However, I cannot get the address fields to store. It always comes back blank.
I'm currently trying like this on the SO_SalesOrderHeader object on the address tab's on exit UI script event
sAddressLine1 = "" : sStoreShipTo1 = ""
retVal = oBusObj.GetValue("ShipToAddress1$", sAddressLine1)
retVal = oScript.SetStorageVar("sStoreShipTo1", sAddressLine1)
Then after the address validation it overwrites our address fields, which I want to overwrite with my saved variables. Don't ask... its a tax deal... all thats important for the tax calc is the zip + 4.
To reintroduce the saved values I was trying later at the end of the script to do:
retVal = oScript.GetStorageVar("sStoreShipTo1", sAddressLine1)
retVal = oBusObj.SetValue("ShipToAddress1$", sAddressLine1)
I'm sure I'm doing this completely wrong or there is a better way to go about it so I'm all ears for any helpful links, or advice you all may have.
Thanks in advance!