Sunday, November 25, 2018

Conflict in Set Field Display Label and Set Field Mandatory workflow actions execution

When both Set Field Display Label and Set Field Mandatory actions are used at the same time for the same field, Set Field Display Label has to come first for both of their actions to execute properly.  Consider the following workflow scenario:

Workflow Summary
-- Record Type: Customer, Subtype: Customer
-- Initiation: On Create, On Update
-- Trigger Type:All

State 1
-- Set Field Display Label (Trigger On: After Field Edit)
---- Client Fields: Inactive
---- Condition:Inactive = T
---- Field: E-mail,Label: Inactive Label

-- Set Field Mandatory (Trigger On: After Field Edit)
---- Client Fields: Inactive
---- Condition:Inactive = T
---- Field: E-mail,Mandatory: False

-- Set Field Display Label (Trigger On: After Field Edit)
---- Client Fields: Inactive
---- Condition:Inactive = F
---- Field: E-mail,Label: Second label

-- Set Field Mandatory (Trigger On: After Field Edit)
---- Client Fields: Inactive
---- Condition:Inactive = F
---- Field: E-mail,Mandatory: True

This sequence correctly sets the field's label and mandatory status at the same time.  If the actions are reversed, the effect of the Set Field Mandatory action will be overridden by the Set Field Display Label action.

No comments:

Post a Comment