• Mik_2240
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hi Guys, I have a custom button and i am hoping to have a check box ticked when this custom button is pressed. 

 

I have followed numerous examples on this website and still cant get it to work. 

 

Can I please have someone look at my javascript and tell me what where i may be going wrong?

 

Thanks heaps. 

 

{!REQUIRESCRIPT("/soap/ajax/16.0/connection.js")}

var CR= new sforce.SObject("locations__c");
CR.Id="{!locations__c.Id}";
CR.loc__c = true;
CR.loc_City__c= 'true test';
sforce.connection.update([CR]);
location.reload(true);