I am trying to setup a button that will allow one to fire assignment rules on a Case without opening the case. Currently I have a Button Setup that is working that for everything other than the assignmentheader option. I am not sure where to assign it to accomplish this. This will make me look like a RockStar so I am hoping that you guys can help me. Thanks.
The Button is a Detail Page Button with a Behavior of Execute JavaScript OnClick JavaScript... Here is the Code
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}
var caseObj = new sforce.SObject("Case");
assignObj = new sforce.SObject("AssignmentRuleHeader");
assignObj.useDefaultRule = 'true';
caseObj.Id = '{!Case.Id}';
caseObj.setOptions(assignObj);
caseObj.IsEscalated = 'true';
caseObj.Status = 'Escalated';
var result = sforce.connection.update([caseObj]);
if (result[0].success=='false') {
alert(result[0].errors.message);
} else {
location.reload();
}
Thanks again for the help. I am sure this is easy but I am newer to JavaScript.