- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 05:10 PM
I see developers and implementors falling on a common mistake in using business rules. Understanding the hierarchy and how the platform works has a significant impact on the outcomes of the desired objectives.
This post on how to use a business rule will give you a firm foundation on when, how, and what is the alternative before creating a script in a business rule to avoid that one common mistake developers and implementors make in using a business rule.
Business Rules are the primary method for customizing platform behavior. The platform loads and starts the Business Rules at the beginning of each user's interaction.
Every business rule is for an application scope or the global environment. You use scoped APIs for scripting in a scoped application.
The global environment is for applications developed before scoping. It is for applications meant to be accessible to all other global applications.
Every business rule includes the table to run against, timing, before or after insert, and more. Also, it provides the conditions to check and the script to run based on the evaluation.
We apply Business Rules to records. This happens regardless of how you access them: through forms, lists, or web services.
Business rules are implemented through forms, lists, web services, and client scripts. They are applied when fields change on a form. This is the main difference between Business Rules and Client Scripts. (I will be posting more about Client Scripts)
The difference between UI policies, business rules are not real-time.
They don't check fields on a form
They check records as they are being inserted or updated.
The main goal of a Display Business Rule is to use a shared scratchpad object. It's called "g_scratchpad" and is sent to the client with the form. You need this when you must build client scripts. They need server data not in the record.
Before writing a business rule, see if Flow Designer can do what you want.
To see a business rule in action.........
Here is how: ServiceNow Basics: When to Use ServiceNow Business Rules
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 07:30 AM - edited 06-28-2024 07:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 05:31 PM
This should probably be an article not a question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 07:30 AM - edited 06-28-2024 07:31 AM
Thanks, Aidan for your input. Article written above 👆