- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2018 03:04 AM
Is there something called as an After Query business rule?, because i have found documentation on Before Query business rule but nothing on 'after query'. So i wanted to know whether it is something which can be used or not? if it is used, then for what purpose is it used?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2018 04:25 AM
There is no "after query" business rule.
"Before Query" business rules only affect Queries (before they run), by adding an additional condition to the query. It makes no sense to modify a query AFTER it has run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2018 11:16 PM
Hi Reeba,
Options When the rule runs
Before After the user submits the form, but before any action is taken on database record.
After After the user submits the form and after any action is taken on database record.
When a record is updated in Service-now, operations occur in this sequence:
Before business rules run -> Actual database write occurs -> after business rules run
After Rules:
Since they run after the physical update, any changes you make to the record during this rule will not be reflected in the database. This means this is a bad place to set values. On the other hand, at the time this rule runs, your database update has written through, so this is the right place to do things like throw custom events.
So, conclusion is,
[*]Use before rules to set values
[*]Use after rules to react to inserts/updates/deletes
Regards,
Devyani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2018 04:25 AM
There is no "after query" business rule.
"Before Query" business rules only affect Queries (before they run), by adding an additional condition to the query. It makes no sense to modify a query AFTER it has run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2018 11:42 PM
Hello Julian,
Thankyou for answering my question. It is now that i realized my question was so silly.
Regards,
Reeba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2021 03:13 AM
There are Use Cases when After Query Business Rules are needed. If you want to get data not only from ServiceNow tables.