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

Add Chekcbox option in Javascript Alert Box on Custom Button Click

Hello All,

I have a requirement to add checkboxes(options) in a javascript alert box prompted on click of a custom button (on standard layout) using execute javascript.
So the flow should be , a user clicks the custom button, it should pop a alert box with multiple checkbox options, where the user can select one or more options, which should be returned back to the button code for further processing.
I am stuck on adding checkboxes in to the alert box. 
Any trick to achive this ?

Hi Sidharth,

There are two things,

1. Alert box (that you are trying), it just show OK only.
2. Confirmation box, it have YES and NO options, on click of YES its continues the proces and vice versa. go to below link

But that you are trying you need to pop-up a box which have checkboxes on it. you can use javascript for that but not alert neither Confirmation box.
Go to below link

Abhi Tripathi
SFDC Certified Developer