Previous value with async business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 03:40 AM
Hi experts,
as I've understood, the "previous.fieldName" does not work in an async business rule. What would then be the best way to find the current Incident's previous assignment group in an async business rule? Should I just do a gliderecord query to sys_audit using the current Incident's sysid and current assignment group as the new value to get the old value, or is there a more efficient way to achieve this? As the sys audit hold massive amount of records, this seems like a heavy operation. This also requires me to do another lookup to groups table as the sys_audit only displays the sysid of the assignment group and I need the display value.
I have no power over creating a new field for saving the previous value, so that' out of the question.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 03:50 AM
Hi Earo,
I am not sure that I fully understand why you need to do this as an async business rule, but you are absolutely right, that the previous value is no longer available for async business rules.
If the reason for doing this as an async business rule is performance you could consider adding a before or after business rule that creates an event and then start your script based on the event.
Read more about events here: Events
I hope this helps!
/Lasse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 09:04 AM
Hi Earo,
Just to follow-up. Did you try using an event to trigger your async script and store the current and previous values in the parms of the event?
Kind regards
Lasse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 10:58 PM
Hi Lasse,
thanks for your suggestion and sorry for not getting back. Your suggestions would most likely work, but for now we're just going with a "quick and dirty" -solution and use a field on the Incident that is not in use.
-Eero
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 09:20 AM
I am happy that you found a solution 🙂