raghav
04/26/2024, 3:22 PMrec = record.load({
type: 'salesorder',
id: 13087989,
isDynamic: true
})
shippingAddress = rec.getSubrecord({ fieldId: 'shippingaddress' })
shippingAddress.setValue({ fieldId: 'addressee', value: 'XYZ' })
shippingAddress.save() // this throws an error
rec .save() // this updates the address on sales order by creating a new custom address record. here the old nkey is not equal to the new nkey of the shippingaddress subrecord.
Eric B
04/26/2024, 9:54 PMraghav
04/27/2024, 3:30 AM