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
Sky1990Sky1990 

Reload Inline Visualforce page on Button Click

Hi,

I have a button in a visualforcepage which is an inline visualforce page embedded in a standard page layout.

On the button click i just want to refresh the visualforce page not the entire standard page.

How can i do it.

Thanks,
Tavant TechnologiesTavant Technologies
You can use a commandbutton with rerender attribute to refresh part of page
 
                
                 
        
Shrikant BagalShrikant Bagal
Hello Sky1990,
As Salesforce display inline VF in iframe, you can use following javascript function to reload you inline VF.


call in from button as


Hope it helps!!!!!!!!!
Shrikant BagalShrikant Bagal

As Salesforce display inline VF in iframe, you can use following javascript function to reload you inline VF.
 


call it from button using following code
 


Hope its help you!!
Shrikant BagalShrikant Bagal
As Salesforce display inline VF in iframe, you can use following javascript function to reload you inline VF.

 javascript Function()

function reload()

    location.reload(); 


call it from button using following code



​Hope its help you!!
Sky1990Sky1990
Hi Shrikant,

I can't see the code which you have given. Can you upload it again.

Also, the the button in my code calls a controller metod to update a records
 will your code work in case of that.

thanks
Shrikant BagalShrikant Bagal

Use folowing button code:



hope its help!!!
 
Shrikant BagalShrikant Bagal

hope its help!!!
Shrikant BagalShrikant Bagal
Please use following link for code:

http://screencast.com/t/5nI80MLKEp82

hope its help!!

 
Anupam RastogiAnupam Rastogi
Hi,

Using the rerender attribute is the best way to refresh a particular section on a page because it is provided by Salesforce.

You just need to mention the id of the apex component within your inline VF that holds the section which needs to be refreshed within the rerender attribute of the button.

As an example, I tried a simple experiment which works for you to refer.

The below VF page is included within the Account Page Layout. It has a button named 'Button 1' which when clicked refreshes the page block having id = pb.

    
        
            
                
                    
                        
                              
                            
                                                                                
                    
                
            
            
                
            
        
    
Thanks
AR

It this solves your problem then please mark it as best answer.
 
Anupam RastogiAnupam Rastogi
I guess the codes are not getting pasted. So here is the code again.


   
        
        id="pb" >
           
               
                   
                       
                             
                           
                                                                               
                   
                   
                       
                             
               
           
           
           
                reRender="pb" >
                    
               
           
       
   


Thanks
AR
Shrikant BagalShrikant Bagal
if its resolved your issue,please mark as best answer so it will help to other who will serve same problem.
​Thanks!