- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-18-2018 07:02 AM
I have an UI button(which gets executed on client) on Change form which moves the changes to Asses state based on certain validations. Now I have a requirement to make some additional validations before the change is moved to Asses state. For this I have written a Before business rule firing on state change to Asses, but it's working. It appears the BR is getting fired after UI action making the changes to State. I want to know if it's possible to have the BR execute along with the UI action so that when the UI action sets the change state to Asses and before it's saved to db want to have my Before BR fired and do it's validations. If yes, please advise the procedure.
Thanks in advanced,
Rohit
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-18-2018 07:07 AM
'Before' business rules always run before the record is actually saved to the database. If you want to move the business rule code into the UI action you can do that using this SNGuru solution.
https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-18-2018 07:07 AM
'Before' business rules always run before the record is actually saved to the database. If you want to move the business rule code into the UI action you can do that using this SNGuru solution.
https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-19-2018 02:09 PM
Thank you this has been really helpful

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-18-2018 07:23 AM
Hi Rohit,
Instead of writing a business rule and wanting it to run from the UI Action, you could either move the business rule code to the UI Action or instead put all the business rule code in a script include and call the script include from the UI Action (a better solution).
Thanks.