How to make scheluded workflow go through all the ...
# ask-stanley-ai
t
How to make scheluded workflow go through all the records before restarting it?
c
AI generated answer (using internal Slack threads):
To make a scheduled workflow go through all the records before restarting it, you can use a combination of SuiteScript and SuiteFlow. Here's a general approach: 1. Create a custom field on the record type that the workflow is running on. This field will be used to track whether a record has been processed by the workflow or not. 2. In your workflow, add an action at the end to set this custom field to indicate that the record has been processed. 3. In your saved search that the workflow is using, add a criteria to exclude records where this custom field indicates that the record has been processed. 4. Schedule your workflow to run at a frequency that suits your needs. This way, each time the workflow runs, it will only process records that haven't been processed yet. Once a record is processed, it will be excluded from the saved search results, and thus won't be processed again in the next run. As for getting notified when the workflow has finished processing all records, you can create a SuiteScript scheduled script that checks the count of records returned by the saved search. If the count is zero, it means all records have been processed, and you can send an email notification using the
nlapiSendEmail
function. ****** 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.795517504
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.79287219
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.787193954
Please provide your feedback on this answer.