Using the API nlapiGetFieldText('orderstatus') does not pull the correct status of the Sales Order once it has been approved. It still shows the status as Pending Approval. It will only display the status as Pending Fulfillment once the Sales Order has been edited/saved. Using nlapiGetFieldText('status') also does not work.
In order to display the correct status of the Sales Order after it has been approved, use this script instead in the AfterSubmit event:
*Note: This will only get the status after approving the Sales Order. Once the Sales Order is fulfilled/billed, since this is done on the item fulfillment record/cash sale record, it will not get the status until the Sales Order itself is edited/saved.
Post a Comment