You need to sign in to do that
Don't have an account?
nrwing
Thanks a ton in advance!
java script - changing opportunity record type and reload page
I have the below code setup for a detail page button/on click execute java script, and it doesn't give any errors, it reloads the page, but it doesn't change the record type at all. From everything I can find this should work. Any eyes see what I cannot?
Code:
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} var newRecords = []; var c = new sforce.SObject("Opportunity"); c.id ="{!Opportunity.Id}"; c.RecordTypeId = "01240000000DMIpADO"; newRecords.push(c); result = sforce.connection.update(newRecords); window.location.reload();
Thanks a ton in advance!
All Answers
Eh? What was the solution?
/Mats