+ Start a Discussion
Project newProject new 

checkbox enabled

Hi 

In standard page layout one custom button Created ,whenever click on the button the corresponding all records checkbox enabled how can i achive this plz give me sample code.

Thanks
Project
 
Vinoth Vijaya BaskerVinoth Vijaya Basker
Hi, 

Please find the below Sample code, 
 
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")}
var account = new sforce.SObject("Account");
account.id = "{!Account.Id}";
account.CheckeboxCustom__c = true;
result = sforce.connection.update([account]);
window.location.reload();

Paste the above code in Custom button which executes Javascript. 

This code updates the Custom Checkbox field of Account record. 


Thanks,
Vinoth