function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trailhead solutions 10trailhead solutions 10 

custom button --field update

Hello

I have a custom button. On clicking on that, a field update with checkbox true has to be done. How this can be done with Apex and VF. Any code, Please suggest.

Thanks
TS
ANUTEJANUTEJ (Salesforce Developers) 
Hi there,

In case if you are just trying to update only that particular field that you can try checking the below link :

>> https://www.jitendrazaa.com/blog/salesforce/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit/#:~:text=Navigate%20to%20%E2%80%9CCustomize%20%7C%20Accounts%20%7C,content%20source%20%E2%80%9COnclick%20JavaScript%E2%80%9D.&text=Add%20this%20newly%20created%20button,and%20will%20update%20current%20record.

I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be useful for others in the future.


Regards,
Anutej
trailhead solutions 10trailhead solutions 10
Hi Anutej,

I achieved this through launching a flow and adding a action on detail page.

Anyways, thanks a ton for your response on sharing solution.

Thanks
TS