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!
Does not work, why ? (custom code on FORM)
The following works:
------------------------------------------------------------
else if (name == 'custrecord_commuter_student')
{
var recordID = nlapiGetFieldValue('custrecord_commuter_student');
var record = nlapiLoadRecord('customer',recordID);
var addressbookCountry = record.getLineItemValue('addressbook','country',1);
nlapiSetFieldValue('custrecord_commuter_country', addressbookCountry);
}
-------------------------------------------------------------
But I changed the RED to the following, but it does not work. WHY?
-------------------------------------------------------------
else if (name == 'custrecord_commuter_student')
{
var recordID = nlapiGetFieldValue('custrecord_commuter_student');
var record = nlapiLoadRecord('customer',recordID);
var addressbookCountry = record.getLineItemText('addressbook','country',1);
nlapiSetFieldValue('custrecord_commuter_country', addressbookCountry);
}