Workflow rule fields
You can set workflow conditions using the Restricted to Team, JavaScript Condition, and Trigger SQL Clause fields on a rule, and by adding JavaScript to the Create Script, OnChange Script, and Validate Script fields on some actions. You can also use field security to set access right to individual fields on a screen. For more information, see Adding security types for a field.

Field

Description

Clone an existing rule

The existing rule that the new rule is based on.

Clone the actions associated with the Rule

Clones the actions of the existing rule selected in Cone an existing rule.

Table or view

Table:The entity table that's checked to see if the rule conditions are met.

View: The table view that's checked to see if the rule conditions are met.

Views let you customize the set of fields within the JavaScript condition. There may be significant performance improvements if you use a view that includes only relevant records rather than performing a whole table scan. If you select View, ensure the correct entity is displayed in Table.

A workflow update action occurs only on the table on which the workflow is based. To update multiple tables at once, use an ASP page or an Execute SQL workflow action.

Rule Name

The name of the new rule.

Available for Cloning

Includes the new rule in the Available for Cloning list so you can base other rules on this rule and its associated actions.

Rule Enabled

Enables the rule. You must enable the rule if you want to add it to a workflow.

Type

The type of workflow rule. For more information, see Workflow rules.

Alternative Image for Rule

The image that's displayed in the UI if this rule is visible to the end user. The default image is a small green bullet (WORKFLOWDEFAULT.GIF) followed by the rule name.

To add a new GIF, ensure it's saved in ...WWWRoot\Themes\Img\[theme name]\Buttons in the Sage CRM install and select it from this drop-down.

Restricted to Team

Restricts the rule to users who belong to this primary team. This is the most simple way of limiting access to the rule. To restrict the rule to members of two teams, or to create more complex restrictions, use JavaScript in Javascript condition.

Order

The order in which the field appears on screen when progressing a workflow rule.

Interval

The interval (in minutes) at which the rule runs. You can use this field to fire rules repeatedly within a certain time frame. For example, for high priority cases you could specify that a reminder email is sent between 7am and 9am every day to the assigned user.

If a specific rule takes longer to fire than other rules, it's a good idea to specify a value in this field.

This value overwrites the value in Notify Interval in Workflow & Escalation Configuration.

For more information, see Workflow and escalation settings.

.NET

Calls a .NET assembly and displays the Method Name field. Enter the . NET DLL name in Custom File Name and the method in Method Name. Use a DLL to execute custom business logic. If you add actions to a workflow rule that uses a .NET DLL, the actions are not executed. The .NET method is executed instead. You cannot link a .NET DLL to an escalation rule.

Custom File Name

The name of the custom file that's linked to the new rule. The custom file must be saved in the CustomPages subdirectory of your Sage CRM install.

If you add workflow actions to a workflow rule that uses a .NET DLL or ASP page, the workflow actions are not executed. The .NET method or ASP page is executed instead.

You cannot link a .NET DLL or ASP page to an escalation rule.

Method Name

The name of the .NET method that's called. If you add actions to a workflow rule that uses a .NET DLL, the actions are not executed. The .NET method is executed instead.

You cannot link a .NET DLL to an escalation rule.

Javascript condition

The JavaScript condition that determines if the workflow button for the rule is displayed. The workflow button is hidden when the condition is false, and is displayed when the condition is true.

Rule actions occur only when this JavaScript condition is met. You can use # codes in JavaScript conditions. For more information, see Using the ## and # symbols.

For example, you can specify that a specific person must approve a quote, or that an opportunity forecast must be above $10,000 to progress from a lead to a qualified prospect.

JavaScript conditions can reference fields from any entity created by the workflow using one of the following actions with a label:

For example, you can set up a rule using Create Task with Attribute set to Hidden that creates a communication with a label. Then you can create a JavaScript condition that references the communication label and executes only when the field value is Complete.

The following JavaScript condition limits access to the workflow button to the Support team (ID 1) and Operations team (ID 5). These IDs are taken from the Channel table in the demo data.

var intTeamID = CurrentUser.user_primarychannelid;
if (intTeamID == 1 || intTeamID == 5)
{Valid = true;}
else
{Valid = false;}

Trigger SQL Clause

A condition in the form of an SQL WHERE clause. Escalation rule actions occur only when the condition is met. The WHERE term is assumed so you don't need to add it to this field. You can use # codes within SQL trigger clauses conditions. For more information, see Using the ## and # symbols.

 

When you create a notification rule, the user must be able to dismiss and snooze the notification. The WHERE clause must include ‘ and xxxx_datetimefield < #T’, and the action must use the same ‘xxxx_datetimefield’ name. When the user dismisses the notification, the field specified in the action is set to null. When the user snoozes the notification, the field specified in the action is set to the current time plus the number of snooze minutes.

 

When you create an email rule, you must include a stop clause so the email is sent only once.

Add a field to the table to flag if the email has been sent. The WHERE clause must include ‘and xxxx_emailsent = null’. In addition to the email action, add a field action to Set Column Value that sets xxxx_emailsent to Y.

For more information, see Trigger clause examples.