Skipping trigger execution for process builders - BETA
Insert or update performed through a customized process builder causes Remedyforce triggers to get executed. With multiple such processes, triggers get called multiple times resulting in SOQL 101 error. You can set the Skip RF Trigger Execution field that is available for Incident, Task, and Change Request objects. This flag should be used with process builders to skip any trigger execution for that process builder.
When to use the flag
If you set the Skip RF Trigger Execution field for a process builder, then the Remedyforce triggers are skipped. Therefore, be cautious while setting this field.
Use the Skip RF Trigger Execution field only if there are active process builders that are resulting in SOQL101 error and where you do not need to execute the Remedyforce triggers.
Customers might have many workflows and triggers along with process builders where triggers might be causing SOQL101 error. Trigger execution might not be required every time a record for an Incident, Task, or Change Request is created or updated. In such situations, the Skip RF Trigger Execution field can be set to TRUE so that the Remedyforce triggers are skipped and SOQL 101 error is avoided.
If customer is updating any of the following fields through process builder, the Skip RF Trigger Execution field should not be used in same process builder.
- Due Date
Note that using the recurrence feature in an active process builder might result in SOQL 101 error if it meets the criteria.
How to use the flag
Let us consider the following examples to understand how the Skip RF Trigger Execution field works when used with process builders.
- Agreement: Service= Email Service ; SLT Qualification: Category=Hardware
- Incident template: INC1 (Category=Hardware, Clientemail@example.com)
- Workflow#1: [Rule Criteria: Category=Applications; Workflow Action: Apply template: INC1]
- Process Builder#1:
Immediate Actions: Service=Email Service
- Create an Incident with Category=Applications.
- Template INC1 will get applied to the Incident which will change the Category to Hardware.
- Now Process Builder#1 kicks-in, sets Service field to Email Service and SLA is applied.
Result: If the Skip RF Trigger Execution field is added to the Process Builder#1 and is set to TRUE, then Remedyforce trigger execution is ignored.
Let us consider a complex example where the user encounters a SOQL 101 error.
- Create following Incident templates:
Temp1 (Client: firstname.lastname@example.org, Category: Hardware, Impact=HIGH, Urgency=HIGH, Service=BS1)
Temp2 (Service=BS2, Urgency=MEDIUM)
- Create following Request Definition:
SR1 (Service=BS1, Incident template=Temp1)
- Create following Agreement:
SLA1 (Service: BS1, SLT qualification: Impact=HIGH, Urgency=HIGH)
- Create these Workflows:
WF1 (Rule criteria: Urgency=HIGH, Workflow Action: Field Update=Template Name (Temp2)
WF2 (Rule criteria: Impact=LOW, Workflow Action: Field Update=Template Name (Temp3)
- Create and add a custom field of Text type to Service Request form.
- Create following Process Builders:
PB1: (Criteria: Urgency=MEDIUM, Action: Impact=LOW)
PB2: (Criteria: Impact=LOW, Action: Urgency =LOW)
PB3: (Criteria: Impact=LOW, Text1 (custom text field) =Updated by PB3)
Create a Service Request by selecting template SR1.
Result: The service Request is not created and results in too many SOQL queries: 101 error.
To avoid SOQL 101 error: Create a clone of PB1 add the Skip RF Trigger Execution field in the action of the Process Builder and set it to TRUE. Now create a Service Request using the template SR1, which is successfully created. Adding the field skips the Remedyforce trigger execution.
- Set the Skip RF Trigger Execution field for a process builder cautiously as the Remedyforce triggers are skipped when you set this flag.
- Use the Skip RF Trigger Execution field flag only if there are active process builders that result in the SOQL101 error and where execution of Remedyforce triggers is not required.
Component diagram for trigger execution