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
Atul GuptaAtul Gupta 

Conditionally hide inline vf page from contact page layout

Hi,

 

I want to conditinally hide an inline vf page embedded in contact page layout.

 

Don't want to use sidebar javascripts.

 

Please advice.

pooja@magichorse.compooja@magichorse.com
Please mention your condition. Do you want to hide base on record type? or for some particular page layout?
hitesh90hitesh90

can you explain more on which condition you want to hide and show inline vf page? and on which object?

Atul GuptaAtul Gupta
Yes I want to hide my inline page on a button click on the embedded page.

I don't want to go pagelayouts for specific recordtypes and then changing the recordtype to change page layout way.

Currently I've taken the the of the embedded vf page in an outputpanel and rendered it according to a Boolean set on click of the button mentioned above.

________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

______________________________________________________________________________________

www.accenture.com
hitesh90hitesh90

Hi Atul,

 

You can fulfill your requirement using javascript.

below is the sample VF page as per your requirement add it in to the Contact standard page Layout.

and check.

 

Visualforce Page:

<apex:page id="mypage" standardController="contact">
     <script>   
        function hidemyPage(){
           document.getElementById('mypage:frm').style.display = 'none';
           return false;
       }
   </script>  
    <apex:form id="frm">
        <apex:pageBlock >
           <apex:inputText/>
        </apex:pageBlock>
        <apex:commandButton value="Hide My Page" onclick="return hidemyPage();"/>
    </apex:form>
</apex:page>

 

Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/

 

Atul GuptaAtul Gupta
Thanks Hitesh !

Now the thing is I'm able to come to this stage but every time the embedded page 's display is set to none, I'm left with a big white space on the page, I want to get rid of that white space as well.

Any ideas ??

________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.

Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.

______________________________________________________________________________________

www.accenture.com
harsha__charsha__c
This may help you!!!

https://iwritecrappycode.wordpress.com/2014/04/24/automatic-resize-of-embeddedinline-visualforce-pages/

There is a package referred in that link, which is badly visible becoz of the site background : Here is it : https://login.salesforce.com/packaging/installPackage.apexp?p0=04ti0000000TY0J

- Harsha
bhavyashree nagammabhavyashree nagamma
Hi Atul,

Did you find the solution for this your question..??i am showing an inline VF page conditionally on the details record.. but when the VF Page is not rendered blank space appearance..
DheeruDheeru
Hi,

Did anyone find the way to Show/hide inline VF page on a record detail page based on a condition?