Introduction:
High-traffic transaction forms in NetSuite tools can include a purchase order, sales order, cash sale, invoice, etc. In these highly utilized forms, often information is manually added at the line level even though it is already provided in the body of the transaction. The duplication of effort can have a hugely negative impact on the overall productivity of system users.
Overview:
This post reviews how to automate this process, describing the steps involved in crafting a solution for auto-filling line data that already exists in the transaction body. To complete this setup we recommend using the Administrator role or another role with adequate permissions to create and edit SuiteScripts. While there are many ways to solve technical problems, using NetSuite’s SuiteScript was the chosen method for this use case.
There are many ways to create a JavaScript file, and we prefer to use the Integrated Development Environment (IDE) Eclipse. When creating a script, make sure to include the API Version and the Script Type as shown below. For this solution, the User Event script type will be used, as well as the Before Submit entry point.
Sample of API Version and Script Type:
The main purpose of this script is to collect information from the body of the transaction form, then assign the appropriate value to the correct field at the item (line) level. First, the script needs to query for the body field information desired and assign each value to a variable. Second, the values for each of the corresponding line fields will need to be evaluated. Depending on the line field values, no action may be required. However, the benefit of the automation is that it assigns the previously gathered variable value to the line-level field value. This process repeats for all lines listed on the transaction form.
Body Fields with Blank Line Fields:
Finally, if using the Eclipse IDE, uploading the file created to the File Cabinet should be as simple as selecting File > NetSuite > Upload File in Editor. Once the file is uploaded, navigate to: Customizations > Scripting > Scripts > New. Then, select the JavaScript file and click the Create Script Record button. The script record page will then need to be filled out. The Name and ID fields are particularly important parts of the record because the ID will be what is used to reference this file in the future. This form is also where the deployment selection is made. In this case, the files the script is deploying to are the Sales Order form and the Purchase Order form. Now simply click Save and test the functionality. If you are facing any issues here, then connect with NetSuite experts, they will be happy to assist you in every way possible.
Deployment Form Selection:
Final Output Location and Shipping Method Populate Line Fields Automatically:
Conclusion:
DMC Strategic IT has created many solutions and tools for various use cases. If you would like to know more about this specific solution and/or other tools we can provide, please contact us. We would like to engage with you and ideally, help create the custom NetSuite account that works best for you and your company.
About Us
We are a NetSuite Solutions Partner and reseller with 30+ years of combined experience. We specialize in implementation, optimization, integration, rapid project recovery and rescue as well as custom development to meet any business need. If you would like more information on NetSuite or are in need of consultation for your project or implementation, feel free to contact our NetSuite support.
To Contact Us Click Here