Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Simple script that pulls the original sales order number to a custom field on a copied sales order
I was following SuiteAnswers: Answer Id: 44790, but am obviously missing something. I will first note that I am working in our Sandbox and have no experience with scripting. I am hoping this would be an easy answer for someone in this forum.
1. I started by creating a custom transaction body field on our Sales Order form. Field ID: 'custbody_dlw_originating_record'
2. Create a Client Script with a pageInit function using the sample code below
3. The script looks like this:
function getSourceID(type){
if (type = 'copy'){
var entryForm = nlapiGetFieldValue('entryformquerystring');
if (entryForm.charAt(0) == 'r'){
var entryForm_substr = entryForm.substr(8);
var start_pos = entryForm_substr.indexOf("=");