if user effect script and workflow edit the same v...
# ask-stanley-ai
c
if user effect script and workflow edit the same value, what error will emerge?
c
AI generated answer (using internal Slack threads):
If a user event script and a workflow try to edit the same value simultaneously, a
RECORD HAS BEEN CHANGED
error will likely occur. This error is triggered when two scripts or users attempt to edit/save the same record at the same time. To avoid this, you can try to merge your workflow actions and scripts. If you have workflow actions running while having workflow action scripts, try to merge them into the same workflow in the same state. For example, if you run a set value on entry and also a workflow action script on entry, merge them. Also, ensure your workflows run one state at a time, instead of switching between states to perform actions. If there are no workflows, then you need to identify what other processes are doing
rec.load
,
rec.save
, and you might want to change them to inline edits. Remember, User Event scripts trigger before workflows for the same entry point. So, if you set a field value in a before submit User Event script and use that field as a condition in a workflow that also runs before submit, it should work because the field value set by the User Event script should be available to the workflow. ****** 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.832236946
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827227175
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825630963
Please provide your feedback on this answer.