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!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Copy an Existing Customer Record
Hi,
I am trying to use the nlapiCopyRecord function to make a copy of an existing customer record and save it as a child record of that existing customer.
When my newly copied customer object is saved via the nlapiSubmitRecord function I get a duplicate error.
This appears to be due to the internal ID being copied with the other information from the source customer record.
Here is a snippet:
//////////////////////////
currentRecord = nlapiLoadRecord('customer',custIDArray[i]);
//custIDArray[i] is the internalID of a customer record returned in a searchresult.
var newID = currentRecord.getFieldValue('entityid') + 'E';
newRecord = nlapiCopyRecord('customer',currentRecord.getId());
newRecord.setFieldValue('entityid',newID);