Override Default Value of Handling Mode Field via Workflow Action Script

On the Enter Sales Order page, there’s a Handling Mode field under the Billing subtab, which is set to a default value of “Processing.” This default value can be overridden and set to “Save Only” using a Workflow Action Script with the Before Load Trigger Type.

Solution

  1. Navigate to Customization Scripting Scripts New
  2. Select the Add (+) button which will prompt a pop-up window
  3. Select Upload and look for the Custom Script in your Files/Folders
  4. Select Save
  5. Select Create Script Record
  6. Select Workflow Action Script
  7. Name: Enter a Name for your Script
  8. Example: Custom Workflow Action Script
  9. Function: Enter handlingMode
  10. Select Save and Deploy
  11. Set the following values then hit Save:
  • Applies To: Enter Sales Order
  • Status: Select Released
  • Log Level: Select Debug
  • Roles (Select All): Enter checkmark

2. Create a Workflow by navigating to Customization Workflow Workflows New

a. Set the following:

  • Name: Enter a Name for your Workflow

Example: Custom Workflow 

  • Record Type: Select Transaction 
  • Sub Types: Select Sales Order
  • Release Status: Select Released
  • Event Definition: Tick On Create
  • Trigger Type: Select Before Record Load

b. Select Save

c. Then, add the created Workflow Action Script as New Action

 

Sample Script

function handlingMode(){
	nlapiSetFieldValue('handlingmode', 'SAVE_ONLY');
}

Leave a comment

Your email address will not be published. Required fields are marked *