You need to sign in to do that
Don't have an account?
Pagereference redirect from IFRAME only working in developer mode
Hi - I'm trying to use a home page component to direct users to an agreement that they need to sign before they can use our SF system.
The home page component uses and IFRAME that calls a VF page. The apex class then does some processing, and if they haven't already agreed to the rules, then the page redirects to the agreement page, with the following code:
if (agrees != true) { PageReference pageRef = new PageReference('/apex/useragreement'); pageRef.setredirect(true); return pageRef;
The idea is that the IFRAME on the homepage is very small so hidden, and if this condition is true, the agreement page needs to open over the home page, preventing the user from doing anything until they agree.
This works fine with developer mode ON for a user, but the redirect only stays within the IFRAME if developer mode is OFF.
Any idea how I can get the redirected page to open on the top for ALL users?
Thanks.
I wrote a blog post a while ago regarding refreshing the parent page from an embedded VF page - the mechanics of this should work in this case too, as long as the iframe is an immediate child of the parent page.
http://bobbuzzard.blogspot.com/2011/05/refreshing-record-detail-from-embedded.html
All Answers
I wrote a blog post a while ago regarding refreshing the parent page from an embedded VF page - the mechanics of this should work in this case too, as long as the iframe is an immediate child of the parent page.
http://bobbuzzard.blogspot.com/2011/05/refreshing-record-detail-from-embedded.html
Many thanks Bob - worked fine.