Template being refreshed when editing field

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a template on a layout which iframes a visualforce page. Also on the layout is a field editor. When a user clicks to edit a field in the field editor, the template refreshes the iframe. Is there anyway to stop the iframe from being refreshed on edits in the field editor?

Thanks,
Paul
Photo of Paul

Paul

  • 442 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
The template component is bound to the same model as the field editor.  The component is listening for changes to the model and refreshing with these changes.  In this case that cuases lots of problems.  Change the template to be associated with a different model (or better yet "none") and you won't have the problem. 

If you need model data to pass into the iFrame, you can make two models that grab the same record information.  One will accept changes and the other won't.  Or you can use global merge syntax. 
Photo of Paul

Paul

  • 442 Points 250 badge 2x thumb
cloning the model and using it for the iframe reference fixed it - thanks!