Editing a Business Rule or Function

The Business Rule editor allows you to edit settings for a business rule and handles Global and Local business rules differently. For more information, refer to the Global and Local Business Rules section of the Business Rules documentation here.

Note: Global business rules can also be edited via workflows and uses the same global Business Rule Editor. For more information, refer to the Business Rules and Workflows topic in the Workflows documentation here.

Open the Business Rule Editor

To open the Business Rule editor in System Setup:

  • Select the business rule, right-click, and select Edit Business Rule from the menu.

  • For a business action or condition, click the Edit Business Rule link on the Business Rule tab.

  • For a business function, click the Edit Business Function link on the Business Rule tab.

Note: Individual operations can be accessed directly without needing to view the Business Rule / Business Function Editor by selecting either the 'View', 'Edit Operation', or 'Edit Externally' buttons beside the relevant operation. Refer to the Operations and Function Tab section below for more details.

For actions and conditions, the Business Rule Editor allows you to modify most parameters on a business rule. However, the ID, Type, and Scope, cannot be edited and are shown with read-only text. Additional configuration is performed on the Edit Operation dialog (accessed by clicking an edit button on the Operations tab).

For functions, the Business Function Editor includes options about the operation provided via the Query Template Builder or the JavaScript included on the Edit Operation dialog (accessed by clicking an edit button on the Function tab). For more information on setting up business functions, refer to the Calling a Business Function from a JavaScript Business Rule topic in the Business Function documentation here.

Editor Parameters

The Business Rule Editor parameters are defined below and can be set on a condition, an action, or a function business rule:

ID Parameter

Read-only display to indicate the business rule ID assigned while creating the business rule.

Name Parameter

Displays the business rule name assigned while creating the business rule and can be modified.

Description Parameter

Displays the business rule description assigned while creating the business rule and can be modified.

Type Parameter

Read-only display to indicate the type of business rule being edited. This can be action, condition, a function, or a library.

Scope Parameter

Read-only display to indicate if the business rule is global or local.

On Approve Parameter

In the On Approve field, specify if the business rules should be run during an approval process. This only applies to global business rules. For local business rules, the setting of the workflow determine this parameter.

For details on these options, refer to Business Rules on Approval here.

Click the ellipsis button () to display the On Approve dialog. The 'Valid Object Types' and 'Applies if' settings determine if the condition will be tested when attempting to approve a revisable object.

  • On conditions, specify to perform the validations before or after approval.

  • On actions, specify to execute the action on approve, and whether to approve changes as well.

Valid Object Types Parameter

Specify the object type or types for which the business action or condition is valid. This only applies to global business rules. For local business rules, the setting of the workflow determine this parameter.

Note: Business functions do not require a Valid Object Type.

Click the ellipsis button () to display the Select Valid Object Types dialog. Select one of the following options:

  • None - The business rule will not be executed or tested on any object type’s instances. Use this option to deactivate the business rule.

  • All object types - The business rule will be executed or tested on all object type’s instances. It is not recommended to use this option since the rule will be executed regardless of the object type.

  • Specify - The business rule will be executed or tested on the specified object type’s instances. This is the common setup since the rule will be executed only on specified object type instances.

    Use the Browse or Search tab to identify and select the desired object type, Click the move right button () until all object types are displayed in the panel on the right. Use the move left button () to remove an object type from the list.

Run as Privileged Parameter

Check the Run as privileged checkbox to allow the business rule to execute functions that the user is not authorized to execute.

Operations and Function Tab

The Operations tab allows you to add or modify the actions or conditions that apply to a business rule. The Function tab allows you to modify the Query Template Builder of the JavaScript function that applies to the business rule.

  • To add a new condition or action, click the Add new Business Action or Add new Business Condition link. A new row is added to the list.

  • To edit a condition, action, or function, click the Edit Operation button. These can also be opened directly from the Business Rule / Business Function tab.

  • To change the order of the business rules, use the up or down arrow buttons.

  • To delete a business condition, action or function, click the X button.

For more information about actions, conditions, and functions, refer to the Business Actions topic (here), the Business Conditions topic (here), and the Business Functions topic (here).

Operations can also be edited externally via the Edit Externally button found on the Business Rule / Business Function tab.

For more information about editing operations externally, refer to the Editing a JavaScript Business Rule Externally topic.

Dependencies Tab

The Dependencies tab allows you to reference business rules to business libraries.

  • To add a dependency, click the Add Dependency link, and type an alias. Then click the ellipsis button () and select a business library that contains JavaScript, and click OK.

For more information, refer to Business Libraries here.

Applies If Tab

The Applies if tab allows you to specify a precondition (a condition) to be evaluated before the business rule is applied.

  • To add a new condition, click the Add new precondition link. A new row is added to the list.

  • To edit a condition, click the Edit Operation button.

  • To change the order of the conditions, click the up or down arrow buttons.

  • To delete a condition, click the X button.

For more information about conditions, refer to the Business Conditions topic here.