I created a visualforce page with some input fields and a save button and there is also an output field which is based on the input fields.

After I click save, the output field remains the same and I need to refresh the page to see the changes.

I want the visualforce to refresh itself but it won't. I tried oncomplete="location.reload()" or return ApexPages.currentPage (in the controller) and similar things but nothing seems to work.

Any help ? Thanks.

  • is your VF page inline VF page? – Ratan Paul Jan 26 '16 at 13:06
  • do not use rerender attribute. – Tushar Sharma Jan 26 '16 at 13:07
  • The VF is inside the opportunity layout – osos9 Jan 26 '16 at 13:10
  • If return null; does not work, please share save button code on Visualforce page and controller's method. – Andrii Muzychuk Jan 26 '16 at 13:57
  • 1
    @TusharSharma, why ReRender should not be used here? – Andrii Muzychuk Jan 26 '16 at 14:56

Have you tried

return null;

in save method of VF's controller?


add ReRender="myForm" to your actionButton

| improve this answer | |
  • 'return null' is already in but it doesn't do much – osos9 Jan 26 '16 at 13:57
  • @osos9, what does id do? – Andrii Muzychuk Jan 26 '16 at 13:58
  • It doesn't refresh the page – osos9 Jan 26 '16 at 14:01
  • Wow. Yes, it shouldn't, Please, check stackoverflow.com/questions/12804530/… . Have you tried return ApexPages.currentPage(); – Andrii Muzychuk Jan 26 '16 at 14:07
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – Sergej Utko Jan 26 '16 at 15:57

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