mrob
02/03/2023, 8:30 PMbattk
02/04/2023, 1:05 AMbattk
02/04/2023, 1:06 AMmrob
02/04/2023, 1:22 AMmrob
02/04/2023, 1:25 AM'SSS_INVALID_SUBLIST_OPERATION', details: 'You have attempted an invalid sublist or line item…ing to add or remove lines from a static sublist.',
when I do something like-
var addressrec = rec.getSubrecord('shippingaddress');
addressrec.setValue('country', address['country']);
addressrec.setValue('zip', address['zipcode']);
...
eventually rec.save()
mrob
02/04/2023, 1:26 AMBe aware that not all subrecords have writable body fields.
but... I need to update the address record and I can't use dynamic modemrob
02/04/2023, 1:28 AMbattk
02/04/2023, 1:37 AMbattk
02/04/2023, 1:37 AMbattk
02/04/2023, 1:38 AMmrob
02/04/2023, 1:41 AMrec = record.load({
type: 'salesorder',
id: 24621,
});
=> DeferredDynamicRecord {…}
var addressrec = rec.getSubrecord('shippingaddress')
=> undefined
addressrec.getValue('addr1')
=> '310, Cambridge Science Park'
addressrec.setValue('addr1', '315 Cambridge Science Park')
=> DeferredDynamicSubrecord {…}
addressrec.getValue('addr1')
=> '315 Cambridge Science Park'
rec.save()
=> N.js?NS_VER=2022.2&minver=15&buildver=30792:2438 Uncaught nlobjError {id: null, code: 'SSS_INVALID_SUBLIST_OPERATION', details: 'You have attempted an invalid sublist or line item…ing to add or remove lines from a static sublist.', stacktrace: 'stacktrace: function nlobjError(code, error, suppr…: undefined},[object Object],0,[object Object]}\n\n', suppressnotification: false, …}
mrob
02/04/2023, 1:41 AMmrob
02/04/2023, 1:46 AMbattk
02/04/2023, 2:35 AMbattk
02/04/2023, 2:35 AMmrob
02/04/2023, 2:45 AMmrob
02/04/2023, 2:49 AM