[h=2]The documentation for nlapiGetNewRecord() states:[/h] Available in beforeLoad, beforeSubmit, and afterSubmit user event scripts. This API never reflects any changes set by the system during the submit operation. It only reflects the field and line item (sublist) values submitted by the user.
Note that you are not allowed to submit the current or previous record returned by nlapiGetNewRecord(). Also note that only fields that are changed (submitted) will be available via nlapiGetNewRecord().
I assumed that this API would only reflect the fields that are changed, in other words the ones that you can see in the system notes as Changed via UI. But when I tried this API on an Inventory Item record manually changing just the value of one field, the fields object returned 387 fields. I also tried the following to compare:
When I used nlapiLoadRecord() the fields object returns about 282 fields, including the one I changed.
When I use nlapiGetOldRecord() the record fields object returns about 277 fields, including the one I changed.
What am I missing? Is there another API that would actually return only the Changed fields? I need to update some related records and I don't want to submit unnecessary fields.
Any help would be greatly appreciate it. Thanks!