NetSuite record.submitFields() vs record.save()

Hi,

I've noticed Celigo will sometimes update records using an inline edit (submitFields / XEDIT event), and sometimes it will update using record.save (creating a normal save / EDIT type event)

- Why does Celigo change the way it saves the record? I know submitFields has a lower impact on governance, or are there other benefits?

- Is there a way to force Celigo to use .save() or .submitFields() specifically?

- how does Celigo decide which method to use?

- Is there a performance benefit to using (internalid) mappings instead of (name) mappings?

 

From my debug logs, tested by changing the terms mapping from (internalid) to (name):

20/08/2024 15:39:11    nlapi calls registered for $R    r = NRecord.load({"type":"customer","id":6,"defaultValues":{}});
r.setValue({"fieldId":"altemail","value":"test@test.com"});
r.setValue({"fieldId":"terms","value":1});
r.submitFields({"type":"customer","id":6,"values":{"altemail":"test@test.com","terms":1},"options":{"enableSourcing":false}});
20/08/2024 15:40:22    nlapi calls registered for $R    r = NRecord.load({"type":"customer","id":6,"defaultValues":{}});
r.setValue({"fieldId":"altemail","value":"test@test.com"});
r.setText({"fieldId":"terms","text":"Net 15"});
r.save({"enableSourcing":false,"ignoreMandatoryFields":false});
0

Comments

2 comments
Date Votes
  • Hi Bas van Ditzhuijzen,

         In NetSuite import we use submitField and SubmitRecord efficiently based on the below scenarios.
    For record creation, transformation, multi-select fields, text fields (Dropdowns, Multi-Selects), subrecords, sublists, and when working with unsupported submitField record types  —submitRecord should be used, as NetSuite Nlapi does not support these actions with submitField.


    However, when updating body fields, it is recommended to use submitFields. This approach minimizes the impact on governance points by allowing you to update one or more fields without updating the entire record, making the process more efficient and faster.

    currently, we don't have a way for users to force Celigo to use .save() or .submitFields()

    0
  • Thanks for the reply! That is good to know :-)

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post