- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 10:47 AM
(function executeRule(current, previous) {
gs.log(current.operation());
})(current, previous);
any reason why do I get null for current.operation() ? what I see online it should work but it doesnt.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 11:00 AM
Hi,
When trying to test this for myself, I saw this pop up below my code:
So, per that, async delete rules won't have access to current...because the record is deleted and gone, thus it can't know the operation.
Please mark reply as Helpful/Correct, if applicable. Thanks!
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-01-2020 06:35 PM
Hi,
I just wanted to check-in on this. If my reply above helped guide you correctly, if you don't mind, please mark it as Helpful & Correct.
Thank you!
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
09-22-2020 12:57 PM
Hi
Instead of async, do it in before delete where you can access table_sys_id and pass it to the 3rd party API.
Mark the comment as a correct answer if this answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 12:22 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 01:11 PM
That "null" information is only talking about "previous" in async, which is true, it will be null and you don't have access to it.
Current is still available in Async: https://hi.service-now.com/kb_view.do?sysparm_article=KB0687840
The problem here is that it's current and delete....and async, which only then is current not available in async.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!