Previous value with async business rule

emaasalmi
Kilo Sage

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.

5 REPLIES 5

lasse3
Mega Guru

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


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


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


I am happy that you found a solution 🙂