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
Cloud99Cloud99 

Modal Confirm Dialog in visualforce page

Hi All - What are ways to implement a modal dialog in a visualforce page. The window.showModalDialog()seems to be working only in firfox and IE. My requirement is :

1. open a an account record (in the page layout I have an inline visualforce page with zero height)

2. based on a field value say, Account_Activated__c (checkbox), a modal window should open up (if the value is false).

3. In the modal dialog there should be two buttons saying "Yes" and "No".

4. If  "Yes" is selected, the field is updated with a true value otherwise its not updated.

 

This could be done using a standard javascript confirm() dialog, but in this case we cannot customize the buttons. They'll always say "Ok" and "Cancel".

 

I tried using jQuery but the dialog was not opening because it the visualforce page height is zero on the standard page layout of account.

 

Any help is highly appreciated.

 

Thanks in advance.

Matt RemyMatt Remy

Hi,

 

Have you tried to follow this tutorial: Modal Window Tutorial ?

 

Worked pretty well for me.

 

Good luck!

 

 

 

Naveen KNNaveen KN
Implement custom dialog box in salesforce lightning 

https://www.codekiat.com/2019/07/confirm-dialog-in-salesforce-lightning.html

--
Naveen K N