Irina Mitrova
11/12/2024, 1:50 PMCeligo AI
11/12/2024, 1:51 PMAI generated answer (using internal Slack threads):When Celigo is set to update a NetSuite record, it can trigger either
record.save
or record.submitFields
depending on the context and requirements.
record.save
is used to save the entire record. This method is typically used when multiple fields on a record need to be updated. It's important to note that using record.save
will trigger User Event scripts associated with the record.
On the other hand, record.submitFields
is used to update specific fields on a record without loading the entire record. This method is more efficient when only a few fields need to be updated. However, it's worth noting that record.submitFields
does not trigger User Event scripts.
In the context of line-level updates, record.setCurrentSublistValue
is used. This method is used to update a field on the current line of a sublist. After setting the value, record.commitLine
is used to commit the new values set on the line item.
In a User Event Script - afterSubmit, to set a field value, you can either load the record and save it or set it using record.submitFields
. However, in the beforeSubmit event, you can use the newRecord which means you don't need to do another save.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
11/12/2024, 1:51 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834607065
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825775206
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819336534
Celigo AI
11/12/2024, 1:51 PM