- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 09:38 PM
For our integration , we need to send event actions based on if current assignment group changes.
I have written a Async After update BR its not working when I use this below piece of code:
current.assignment_group.changes().
Let us know if anyone has any idea on this asap.
Thank you,
Sowmya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 10:32 PM - edited 02-28-2023 10:35 PM
Hi @Kotha Sowmya,
"current.assignment_group.changes()" would work only in condition builder or condition field and not in script section since async business rule don't have access to previous object.
it works in condition since condition is evaluated instantly hence in the condition changes, changeTo and changesFrom work.
You can switch your BR from "async" to "after" update. If you want it to run at last then you can give order as 1000 or greater.
Then you can use "current.assignment_group.changes()" in the script section.
After that based on the field changed (state or assignment group) you can trigger the event. You can create a script action, which will execute when event is triggered and where you will write the scripts to be executed.
Please mark helpful and accept solution if it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 09:44 PM
Note: Asynchronous business rules do not have access to the previous version of a record. Therefore, these GlideElement methods do not work with async rules: changes(), changesTo(), changesFrom().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 09:50 PM
Hi @Kotha Sowmya ,
Could you provide more details related to your requirement.
Why don't you use condition builder for specifying your condition.
Regards
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 10:14 PM
Hello,
We have a requirement to trigger BR whenever a field on incident got changed and we need to send some event actions based on state values and assignment group changes which we are implementing it in the script,that is the reason we are not directly giving in the condition builder.
Thanks,
Sowmya