0

I have a Standard record detail page in which there are sections which include visualforce pages. I'm rewriting these using SLDS to look like lightning. From one VF page I'd like to open a modal which opens not within the section itself but overlays with the standard page behind. Similar to opening a Lightning Action (the modal pops-up over the standard page).

The issue I'm getting is that because the Visualforce page sits within a section of a standard page, when I initiate a button to open a modal it just opens it within the section itself. I've looked at the following http://blogforce9.blogspot.co.uk/2014/01/simple-popup-in-salesforce-standard-vf.html and https://kevansfdc.blogspot.co.uk/2017/02/using-salesforce-standard-modal-in_14.html but could not determine the setting to ensure the modal pop-up instead of just displaying contained within the VF section within the standard page.

Kevansfdc's post refers to a detail page button but I do not want to use a detail page button.

0

I've tried this in the past to no avail either. The issue is that the Visualforce page rests inside of an iFrame, you have to use JavaScript to communicate with the parent page; however, these pages are delivered from two different domains so browsers will usually stop your script from working.

We didn't have the time to fight the good fight on the project so we came up with a more native solution.

This behavior should change in lightning as you wouldn't have it on a VF page sitting in an iFrame, rather, you'd have your code in a component that is loaded directly into the page (LEX allows you to add components to detail pages). Maybe it's time for you to upgrade.

  • Hi Toby, Thanks for your feedback. I'm fearing the same to be honest but will leave the question open for a while yet in case anyone else has found a solution. Thanks for letting me know of your attempts to implement this also. – RedQueries Nov 28 '17 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.