• Rob Klemm
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I'm making an escalate case button for our customers to use.  I need the funtionality to assign the case to a generic support queue if a checkbox is true, if not I need it to assign the case to the corresponding partner queue, which are set in the case assignment rules.  Is there a way to invoke the assignment rules in the javascript button? 
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 
caseObj.Id = '{!Case.Id}'; 


if('{!Case.CW_Advance_Support_Needed__c}' == true) 
{ 
caseObj.OwnerId = '00G30000001oUSL'; 
caseObj.Status = 'In Progress'; 

}else{ 


caseObj.CW_Advance_Support_Needed__c='True'; 
caseObj.Escalated_Date_Time__c=new Date().toJSON(); 

} 

if('{!Case.Incident_First_Response__c}'=='') 
{ 
caseObj.Incident_First_Response__c=new Date().toJSON(); 
} 

var result = sforce.connection.update([caseObj]); 
window.location.href=window.location.href;
  • September 18, 2018
  • Like
  • 0