Skip to main content

We have third party integration with our salesforce instance where the case is created from Sprinklr to Salesforce and it fire auto assignment rule where we don't have any assignment rule active as a result it is assigning the case to the default case owner after the case is created.

 

We tried the work around like uncheck 'Assign using active assignment rules' and used the following code snippet in the case trigger handler in before/after insert but it is not working.

 

Case cas = new Case();

Database.DMLOptions dmo = new Database.DMLOptions(); dmo.assignmentRuleHeader.useDefaultRule = false;

cas.setOptions(dmo);  

 

We can set the Sforce-Auto-Assign header as false in the REST API and it will work but in Sprinklr they said it is not possible on their end to make any changes related to it and it should be done in the trigger.

 

Is there a way to skip auto assigment rule in the trigger events?

 

We have work around like assigning back to the previous case owner after the case is created but wanted to check is there any simple solution for our requirement.

2 respuestas
  1. 22 mar 2022, 1:20 p.m.

    Hi Keiji,

     

    Thanks you for sharing the article.

    From the article what I understand is below syntax is not going to skip auto assignment rule.

     

    dmo.assignmentRuleHeader.useDefaultRule = false; 

     

    We have to write custom logic to change the case owner back to previous owner, is the only option as of now.