You need to sign in to do that
Don't have an account?
Sean Tisdale
JavaScript Button generates no errors
I am not a JS developer so I'm struggling to get my head around this.
I am bulding a JS OnClick button that updates the Owner field in a custom object to a queue.
Here's the code:
The custom object's API name is SupportRequest__c and the Object Name is SupportRequest.
The Syntax comes back clean but when the button is clicked there's nothing. No error. No update to the owner field.
What am I doing wrong?
I am bulding a JS OnClick button that updates the Owner field in a custom object to a queue.
Here's the code:
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} var SupportRequestObj = new sforce.SObject("SupportRequest__c"); SupportRequestObj.Id = '{!SupportRequest__c.Name}'; SupportRequestObj.OwnerId = '00G50000001dv2s'; var result = sforce.connection.update([SupportRequestObj]); window.location.href=window.location.href;
The custom object's API name is SupportRequest__c and the Object Name is SupportRequest.
The Syntax comes back clean but when the button is clicked there's nothing. No error. No update to the owner field.
What am I doing wrong?
Update your button code to the code provided below:
Please mark this question as Solved if this works for you.
Thanks,
Apoorv