Create a business rule

task brazil Updated Sep 10, 2026 4 min read t_CreatingABusinessRule.md
Raw file servicenow.com

You can create any type of business rule to run when a record is displayed, inserted, updated, or deleted, or when a table is queried.

About this task

Note: These instructions and examples provide general guidance for how to implement this functionality. For help with unique use cases, refer to the Developer Community Forum, where you can ask questions, interact with other developers, and search for existing solutions.

Procedure

  1. Navigate to All > System Definition > Business Rules.

  2. Click New.

  3. Fill in the fields, as appropriate.

    Note: You might need to configure the form to see all fields.

Field

Description

Name

Enter a name for the business rule.

Table

Select the table that the business rule runs on.Note: The list shows only tables and database views that meet the scope protections for business rules. Business rules defined for a database view can run only on Query. A business rule for a database view cannot run on insert, update, or delete.

Application

Application that contains this business rule.

Accessible from

Scope protection for a global business rule. Note: This field is visible only when the Table field is set to Global. It does not apply to rules that run on specific tables.

Active

Select this check box to enable the business rule.

Advanced

Select this check box to see the advanced version of the form.

When to run

When

[Advanced] Select when this business rule should execute: display, before, async, or after the database operation is complete.

Note: Consider setting the Order for async business rules as the system uses this value when creating the associated scheduled job.

Newly created async business rules run automatically on upgrade.

Existing async business rules can be migrated to use the new async behavior.

Order

[Advanced] Enter a number indicating the sequence in which this business rule should run. If there are multiple rules on a particular activity, the rules run in the order specified here, from lowest to highest.

Insert

Select this check box to execute the business rule when a record is inserted into the database.

Update

Select this check box to execute the business rule when a record is update.

Delete

[Advanced] Select this check box to execute the business rule when a record is deleted from the database.

Query

[Advanced] Select this check box to execute the business rule when a table is queried.

Filter Conditions

Use the condition builder to determine when the business rule should run based on the field values in the selected Table.If you select the Advanced option, you can also use the Condition field to build a condition with a script. Conditions defined with the Filter Conditions field and advanced Conditions field are evaluated at the same time.

Note: Filters based on string compares are case-sensitive.

Role Conditions

Select the roles that users who are modifying records in the table must have for this business rule to run.

Actions

Set field values

Set values for fields in the selected Table using the choice lists:- The field

  • The assignment operator:
    • To: An exact value
    • Same as: The value of another field
    • To (dynamic): A value relative to the user configuring the business rule or a user with a specific role
  • The value

Add message

Select this check box and enter a message that appears when this business rule is run

Abort action

Select this check box to abort the current database transaction. For example, on a before insert business rule, if the conditions are met, do not insert the record into the database.

If you select this option, you cannot perform additional actions on the record, such as setting field values and running scripts. You can still display a message to users by selecting the Add message check box and composing the message.

Advanced

Condition

Create a JavaScript conditional statement to specify when the business rule should run. By adding the condition statement to this field, you tell the system to evaluate the condition separately and run the business rule only if the condition is true. If you decide to include the condition statement in the Script field or the Filter Conditions field, leave this field blank. Conditions defined with the Filter Conditions field and advanced Conditions field are evaluated at the same time.

To have the instance reevaluate the condition statement a second time before running an async business rule, add the system property glide.businessrule.async_condition_check and set the value to true.

Script

[Advanced] Create a script that runs when the defined condition is true.

Related list: Versions

Versions

Shows all versions of the business rule. Use this list to compare versions or to revert to a previous version.

4. Click **Submit**.

If you run into issues with your business rule, see the Business Rule FAQ [KB0965707] article in the Now Support Knowledge Base.

Parent Topic:Classic Business rules

Related topics

Classic Business rules

Search documentation
Search document titles and file paths on the brazil branch