Rick Goodrow
06/25/2024, 5:43 PMnewCustomerRecord = Nrecord.load({
type: Nrecord.Type.CUSTOMER,
id: newCustomerIID,
isDynamic: false,
});
let newAddressBookEntry = newCustomerRecord.getSublistSubrecord({
sublistId: uvLibID.field.CUSTOMER.sublist.ADDRESS_BOOK.id,
fieldId: uvLibID.field.CUSTOMER.sublist.ADDRESS_BOOK.ADDRESS_BOOK_RECORD,
line: newAddressLineID,
});
Nlog.debug({title: 'createCustomer', details: JSON.stringify(newAddressBookEntry)});
Nlog.debug({title: 'createCustomer', details: JSON.stringify(newAddressBookEntry.id)});
the first debug line is properly outputting the address record.
however when I tr to access newAddressBookEntry.id
, I'm getting null
.erictgrubaugh
06/25/2024, 6:13 PMdetails
in any log
method, there's no need to explicitly call `JSON.stringify`; that is implicitly done for you by the module.
2. newAddressBookEntry.id
is not a valid JSON string; it's a scalar string. You should just be able to pass details: newAddressBookEntry.id
Rick Goodrow
06/25/2024, 6:20 PMnewAddressBookEntry.id
is still null, even though NetSuite says it should be populated with the internal id of the address book recordClay Roper
06/25/2024, 6:50 PMRick Goodrow
06/26/2024, 2:39 PMRick Goodrow
06/26/2024, 4:48 PM