Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Refresh Form Page after Save


I am working on a model-driven form. On the form I have a section that has a canvas app component. Whenever I change data on the form, I want the canvas app component to immediately update so that I don't have to press refresh on the command bar. Is it possible to write a js script that automatically refreshes the section or entire form on save?


Accepted Solutions

@Valentinm2, try this function to reload the full page:


function refreshPage(){


View solution in original post

Super User
Super User

Hello, @Valentinm2, You can create a Javascript web-resource with a function that's called on your Save Event.


Try something like this: (Using >> I set it to false to not save as the script will run on the save event)

function RefreshOnSave(executionContext) {

var formContext = executionContext.getFormContext();






If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.

My Blog:

Hi Ahmed,

Thank you for the suggestion. Unfortunately, this did not resolve my issue. It seems to just refresh the data and not reload the form page.




@Valentinm2, try this function to reload the full page:


function refreshPage(){


@AhmedSalih Wow this worked like a charm, thank you so much!

Also an fyi for people using this solution in the future, methods in the Xrm.Utility namespace are being depreciated, so use Xrm.Navigation.openForm instead 🙂

@Valentinm2 , thank you! Here is the Full Function:

function refreshPage() {
    var formContext = executionContext.getFormContext();


Helpful resources

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,757)