Good morning everyone! I’ve got another rookie question… I’m exploring the Commerce API with an extension for SCA 2019.1 and it seems like I’m not getting the live data from the sales order. Is that normal?
Here’s a quick overview… I am setting a Custom Transaction Body Field using Scriptable Cart. The deployment log shows that it is processing the logic and working with the updated data. In the Extension Service Controller, I’m using nlapiGetWebContainer().getShoppingSession().getOrder().getCustomFieldValues() to return the Custom Transaction Body Fields, and then I’m logging that to the console.
The extension data is accurate at login, but during the session the Custom Transaction Body Field changes because of logic happening in Scriptable Cart. The Scriptable Cart log shows the change, but the data I’m getting back from getCustomFieldValues() is unchanged from the values at login.
Is it possible to get the live transaction body data?
Or do I need to move all the logic into the extension and then push that into the sales order with setCustomFieldValues()?