is it possible to tie a worflow to when a record i...
# ask-stanley-ai
i
is it possible to tie a worflow to when a record is deleted
c
AI generated answer (using internal Slack threads):
Based on the conversations, it is possible to tie a workflow to when a record is deleted in NetSuite. This can be achieved using a User Event (UE) script. The UE script can be triggered on the 'beforeSubmit' or 'afterSubmit' event when a record is deleted. For instance, in a parent-child record relationship, you can use a 'beforeSubmit' event on a delete action in a UE script. This script can iterate through the child record sublist, remove the lines which deletes them, and then save the changes. This approach is efficient and doesn't consume much script governance units. However, if the deletion is not happening in the UI, a Map/Reduce (MR) script could be a potential solution. Each invocation of each stage of the MR has its own governance. If designed properly, it could solve the problem of exceeding script execution limit. But it's important to note that MR scripts could potentially introduce other problems. In addition, a client script can be used to trigger a different record deletion. The client script can be attached to the record using a UE script. The UE script deployed to the record that is being deleted will be triggered. ****** 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.789919
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.781918645
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.781808257
Please provide your feedback on this answer.