You need to sign in to do that
Don't have an account?
Bryan Paldino
Custom button "Unexpected Identifier" error
Hi,
I am tring to update a custom field on the opportunity object using a custom button. I was able to create the button but I get an "Unexpected Identifier" error whenever the button is pressed. I'm new to writing to JavaScipt code, so I'm having some trouble troubleshooting the error.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
Var Opp = new sforce.SObject("Opportunity")
Opp.Id = '{!Opportunity.Id}'
Opp.Submit_to_UW__c = 'Yes'
var results = sforce.connection.update([Opp])
window.location.reload()
I am tring to update a custom field on the opportunity object using a custom button. I was able to create the button but I get an "Unexpected Identifier" error whenever the button is pressed. I'm new to writing to JavaScipt code, so I'm having some trouble troubleshooting the error.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
Var Opp = new sforce.SObject("Opportunity")
Opp.Id = '{!Opportunity.Id}'
Opp.Submit_to_UW__c = 'Yes'
var results = sforce.connection.update([Opp])
window.location.reload()
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
Var Opp = new sforce.SObject("Opportunity")
Opp.Id = '{!Opportunity.Id}'
Opp.Submit_to_UW__c = 'Yes'
var results = sforce.connection.update([Opp])
window.location.reload()
{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/19.0/apex.js")}
Var Opp = new sforce.SObject("Opportunity");
Opp.Id = '{!Opportunity.Id}';
Opp.Submit_to_UW__c = 'Yes';
var results = sforce.connection.update([Opp]);
window.location.reload();