You need to sign in to do that
Don't have an account?
Dorel4
Unexpected Number Error message on a custom button
Hello, I am trying to create a custom button on a lead and opportunity page. When the button is clicked, the checkbox on the field Lead Counts Against User will be checked. I get an error message Unexpected Number when I try to click the button. Here is my code;
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
var leadrcd = new sforce.SObject("Lead");
leadrcd.id = "{!Lead.Id}";
leadrcd.{!Lead.Lead_Counts_Against_User__c}=="TRUE";
sforce.connection.update([leadrcd]);
Please let me know what I am doing wrong. I have tried it with one = also.
Thank you
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
var leadrcd = new sforce.SObject("Lead");
leadrcd.id = "{!Lead.Id}";
leadrcd.{!Lead.Lead_Counts_Against_User__c}=="TRUE";
sforce.connection.update([leadrcd]);
Please let me know what I am doing wrong. I have tried it with one = also.
Thank you
All Answers