Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
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);
}