How to not trigger Postsourcing entry point in cli...
# ask-stanley-ai
b
How to not trigger Postsourcing entry point in client script when using currentRecord.selectLine
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that the Postsourcing entry point is triggered when a line is selected using
currentRecord.selectLine
in a client script. This is because the
selectLine
function is part of the dynamic record mode in SuiteScript, which triggers all the entry points including Postsourcing. To avoid triggering the Postsourcing entry point when using
currentRecord.selectLine
, you can use the
ignoreFieldChange
option when setting the field value. This option prevents the field change from triggering the fieldChanged, postSourcing, and sublistChanged events. Here is an example of how to use it:
Copy code
javascript
scriptContext.currentRecord.setCurrentSublistValue({
  sublistId: 'item',
  fieldId: 'taxcode',
  value: 316,
  ignoreFieldChange: true
});
Please note that this will only prevent the triggering of the entry points for this specific field change. If there are other field changes in your script that do not use the
ignoreFieldChange
option, they will still trigger the entry points. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.798644364
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.789814055
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.788888156
Please provide your feedback on this answer.