If I have a restlet execute a CSV import task, wil...
# ask-stanley-ai
a
If I have a restlet execute a CSV import task, will user event scripts see the CSV import on each record as happening in a CSV import context or a restlet context?
c
AI generated answer (using internal Slack threads):
Based on the conversations, when a CSV import is executed via a Restlet, the User Event scripts will see the CSV import on each record as happening in a CSV import context, not a Restlet context. This is because the CSV import operation is a server-side operation and it is independent of the context in which it is initiated. When a CSV import is performed, the User Event scripts that are deployed on the record being imported will trigger, as long as the "RUN SERVER SUITESCRIPT AND TRIGGER WORKFLOWS" option is checked in the CSV Import preferences. However, it's important to note that User Event scripts will not know whether it's the last record being imported. If you need to run a script after all records are imported, one suggested approach is to create a Suitelet which accepts a CSV file and offloads the record processing to a Map/Reduce script. From the summarize stage of the Map/Reduce script (when it finishes), you can execute the necessary actions. ****** 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.837781191
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834530592
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83226037
Please provide your feedback on this answer.
Thank you for your feedback