function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pavani Akella 9Pavani Akella 9 

Apex trigger to work as edit if a case is escalated

I would like to write an apex trigger to to do a field update to kickoff your workflow/process builder when a case is escalated. The process builder does not send an email when a case is escalated. I'm new to development. Can someone please share the snippet of code if you are have written one for your org please.

Thanks in advance
NagendraNagendra (Salesforce Developers) 
Hi Pavani,

Please find the similar use case below.

When a Case is escalated through an Escalation Rule, the standard checkbox field 'IsEscalated' is updated - it is set to true. This is an update, like any other, and should fire workflows and triggers. Especially triggers. But it is not happening?

Here is the Footprint, How can achieve Workflow changing Status to LATE ?
User-added image

I tried tried work with both OwnerId and IsEscalated Change of field value i wrote workflow formula As below:

Evaluation Criteria - Evaluate the rule when a record is created, and every time it's edited

Rule Criteria-
AND( 
ISCHANGED( OwnerId ), 
IsEscalated =True 
)
Now this works as expected.

Hope this helps you in achieving the above requirement.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
 
Pavani Akella 9Pavani Akella 9
Thanks Nagendra for the repsonse. The owner ID rule criteria does not work for us as we have an assignment rule and omni-channel in place to assign cases to the owner ID. If I write this rule the owner ID would be redirected to the queue and the case owner would change. That would result in the delay the new case owner to understand the issue and resolve the case.