J-Mack
12/11/2020, 7:58 PMNetsuite Tragic
12/13/2020, 8:00 AMSean Murphy
12/14/2020, 2:54 PMJ-Mack
12/14/2020, 5:28 PMNetsuite Tragic
12/14/2020, 9:56 PMJ-Mack
12/21/2020, 2:27 PMNetsuite Tragic
12/21/2020, 7:05 PMfunction updateRecentOrders(type){
var soEntry = nlapiGetFieldValue('otherrefnum');
nlapiLogExecution('DEBUG', 'soEntry length', soEntry.length);
if(soEntry.length !==0){
//Obtain the following value from the SO
var customerID=nlapiGetFieldValue('entity');
nlapiLogExecution('DEBUG', 'Cust InternalID', customerID);
//Most Recent SOs
var recentSO = nlapiLookupField('customer',customerID,'custentity_most_recent_so');
recentSO = recentSO.substr(0,75);
nlapiLogExecution('DEBUG', 'Recent SO', recentSO);
//Append new SO to the existing Recent SO
recentSO =soEntry+' '+recentSO;
//Write new Most Recent POs to Customer record
nlapiSubmitField('customer', customerID, 'custentity_most_recent_so', recentSO);
}
}
J-Mack
12/21/2020, 7:05 PMNetsuite Tragic
12/21/2020, 7:07 PMNickSuite
12/28/2020, 8:29 AM