- 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
09-22-2020 10:59 AM
Hi,
The operation is not available during async because when async selected, it runs in parallel and not after or before the current operation.

- 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
09-22-2020 12:27 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2020 12:55 PM
Hi,
Sorry, I don't know fully what you're doing as this wasn't detailed in your original question...but if you're trying to send a rest call somewhere to tell it to delete and you can't capture current in async delete...then you'll need to do after.
Otherwise, other forms of async (not delete) seem to work fine.
So you'd want to break this out to it's own business rule, after delete BR for one action. Then async insert or update or whatever for the other scenario.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!