TransWikia.com

Updating checkbox From custom buttons

Salesforce Asked by user21944 on December 22, 2021

I have tried so many times for the checkbox to be updated to true when a file is uploaded, however, despite trying and also searching on google, I still couldn’t change the checkbox value.. Is there anything wrong with the codes?

 if({!Account.Check__c } == false)
     {
          var c = new sforce.SObject("Account");
          c.id = "{!Account.Id}";
          c.Check__c = true;
          result = sforce.connection.update([c]); }

One Answer

Have you included the required scripts at the start of the button?

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

Answered by benedwards44 on December 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP