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

Custom Modal Dialogs on standard pages.

I just read the posting "Modal Dialogs in Visualforce.." on the blog, .


I was wondering if you can do this same thing, using a custom button or link on a standard salesforce page. So basically launch a custom modal dialog off of a standard page, and then have the content from the dialog update the standard page. Any ideas?


I kinda want to do the same thing, either in a modal window or inline in an embedded VF page.  No idea if there's access back to the standard page. 




Ron HessRon Hess

a standard page can hold buttons and custom links, these can launch a Visualforce modal dialog. 

Dave built one of these while we were working on that article.


The issue, if i recall, is that your Visualforce page (modal dialog) can update the underlying record just fine but cannot cause a partial page refresh to occur on the standard page ( different domain)


I believe you must refresh the entire underlying page to see the changes made by your Visualforce page.


Ron. Two follow up questions:


1- Can you amend that posting to include the example of launching from a standard page? Or even just post more details about it here. As I am very new to devlelopment I really find postings that take you step by step through the process very useful. I guess where i'm lost is the actually launching of the modul dialog box from the standard page. I follow how it could be done on a visual force page, but not a standard one. 


2- I read somewhere that we can request a feature that enables visualforce pages to be on the same domain as standard pages? Is that true? I'm really hoping it is, because that would take car of the partial page refresh issue you mentionedk, and it would allow us to insert visualforce components that dynamically resize their hieght (I huge pain that I know alot of developer run into). Anyway, any information about this would be extremely helpful. Thanks. 

Ron HessRon Hess

1 - i stand corrected, could not get that to work. the parent is in a seperate domain.  So this sample can run in a standard page, but will not block input from the parent page layout, sorry.


2 - i dont think so, where'd you read it?


I actually read about the domain issue possibly getting fixed in two different places.


Here, and then I also noticed something about it in the FAQ section of this appexchange item that salesforce labs posted, .



Can you let me know what you find out. This would be amazing if it was available. Thanks.


Just in case this isn't currently doable, I posted an idea for it:


Hopefully, it will soon turn to existing feature.


Was this ever resolved? Is there a way to call a modal window on a standard page? I have a project that requires me to, on the click of a button on an Opportunity, either go to a custom visual force page or pop up a modal window if certain fields on the opportunity are not filled in? Do we know if that's doable? If so, how?


Ehhh..   I found that article about YUI modal boxes, and implemented it on my custom VF page.   For the last three days I have been searching for a way to rerender a part of the parent form after the modal dialog is closed, and still have not found anything.   Seems that the parent form is out of scope or something, although the modal dialog is updating the controller variables just fine.  


You should update the original article with that little clause that the parent window cannot be partially refreshed from the modal window.


I do appreciate the article and knowledge though, great stuff.   Thanks.




I just publish a post where I think everything related with modal dialogs on standard salesforce pages is well explained:



I hope you find it useful!