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
MayankAdmMayankAdm 

Overiding VF page on case than assignment rule are not working

Hi All,

We are using Professional edition as per our need we developed VF page after that override on new case button than assignement rule are not working

Please give me solution

Thanks In Advance

Navatar_DbSupNavatar_DbSup

Hi,

 

    You have to write a code for invoke the assignment rules on Case object in controller class.

 using Database.DMLOptions. Now before inserting the case use Database.DMLOptions and with case insertion assignment rules are also triggered,

 

 AssignmentRule  AR = new AssignmentRule();

    AR = [select id from AssignmentRule where SobjectType = 'Case' and Active = true limit 1];

 

 //Creating the DMLOptions for "Assign using active assignment rules" checkbox

 Database.DMLOptions dmlOpts = new Database.DMLOptions();

 dmlOpts.assignmentRuleHeader.assignmentRuleId= AR.id;

 

 Case newCase = new Case(Status = 'New') ;

 newCase.setOptions(dmlOpts);

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

MayankAdmMayankAdm

Thanks for reply But here we are using professional edition there no class and no triger  in this editionso we have to solve this problem witout code

Thanks