You need to sign in to do that
Don't have an account?
SFDC_sadas
Update Case Owner without Hardcoding User-ID
Hi All,
Using Custom button is it possible to update Case Owner without Hardcoding the User-ID.
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
var caseObj = new sforce.SObject("Case");
caseObj.id = '{!Case.Id}';
caseObj.Status = 'New';
caseObj.Complaint_Received__c= new Date();
caseObj.OwnerId = '00G26000000SsWo';
var result = sforce.connection.update([caseObj]);
if (result[0].success == 'false') {
alert(result[0].errors.message);
}
else {
location.reload(true);
}
Using Custom button is it possible to update Case Owner without Hardcoding the User-ID.
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}
var caseObj = new sforce.SObject("Case");
caseObj.id = '{!Case.Id}';
caseObj.Status = 'New';
caseObj.Complaint_Received__c= new Date();
caseObj.OwnerId = '00G26000000SsWo';
var result = sforce.connection.update([caseObj]);
if (result[0].success == 'false') {
alert(result[0].errors.message);
}
else {
location.reload(true);
}
All Answers