• Sébastien Chateau
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi,
 
I try to put a user as case owner but when I insert the case I see that the owner is the default case owner configured in the support setting.
To avoid this I tried to bypass assignment rules :
 
            
Case c = new Case();
c.ownerId = myUser.id;
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= false;
dmo.assignmentRuleHeader.assignmentRuleID = null;
c.setOptions(dmo);
insert(c);

Nevertheless, the default queue case is always owner.
When we create a case outside unit test, it's created with the good user.  

Thanks
 

Hi,
 
I try to put a user as case owner but when I insert the case I see that the owner is the default case owner configured in the support setting.
To avoid this I tried to bypass assignment rules :
 
            
Case c = new Case();
c.ownerId = myUser.id;
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= false;
dmo.assignmentRuleHeader.assignmentRuleID = null;
c.setOptions(dmo);
insert(c);

Nevertheless, the default queue case is always owner.
When we create a case outside unit test, it's created with the good user.  

Thanks