- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 04:55 AM
Hi experts
I just wanted to satisfy my curiosity by asking if there is a specific reason why the "Set field values" field is shown in an "after" business rule?
From what I understand, it is generally considered best practice to update the current record using a "before" business rule. In the case of "async" business rules, the "Set field values" field is not even visible. However, in "after" business rules, it is visible but it seems to not work as expected.
To illustrate, let's say we create an "after" update business rule on the incident table with the condition "State is closed" and in the action tab "Set field values" as "Channel to Walk-in". When we then change any incident to "closed" and observe the channel field, it does not reflect the expected change.
Does the field really do not work for after business rules or do I oversee something?
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 06:13 AM
Hi @Dominik9 ,
Set field values is just setting the value of the field.
In before update BR, it will set the value and then update will take place.
In after update BR, it will update first and then set the value so it will not reflect. Try to set in script and then current.update(). It will update the field.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 06:13 AM
Hi @Dominik9 ,
Set field values is just setting the value of the field.
In before update BR, it will set the value and then update will take place.
In after update BR, it will update first and then set the value so it will not reflect. Try to set in script and then current.update(). It will update the field.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 06:24 AM
Hi Neeraj
Make sense and worked. Thank you :-).