web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Auto Refresh After Flow Run & Field Value Change

(0) ShareShare
ReportReport
Posted on by 70

Hi,

I have created a flow in Power Automate which will set the value of a field based on changed value of a Lookup field. Now the problem is since flows are asynchronous, I can see the change in my field value only after I save and refresh the page. So if I change my Lookup value, I dont see a corresponding change in my other field unless I refresh the page. But I want the change in the other field to show as soon as my Lookup value changes. So I tried using the data.refresh JS code that is supposed to refresh without loading the page, on OnLoad & OnChange event of my Lookup field, but somehow my function is not working. Here is my code...

function onLookUpChange(executionContext) {

var formContext = executionContext.getFormContext();

formContext.data.refresh(save).then(successCallback, errorCallback);

}

Can someone please tell me what is wrong with my code? Or if you know any other way of loading the field value as soon as the Look Up value changes, please let me know.

Thanks!

I have the same question (0)
  • D365 User 06 Profile Picture
    70 on at
    RE: Auto Refresh After Flow Run & Field Value Change

    Thank you Abdul Wahab for your suggestions. This seems like a good workaround to refresh the page, but I thought instead of using Flow and JS together, if I'm using JS, might as well write a JS code to fill my field instead of using Flow. My field needs to be filled with a value from a related entity, so I used the function retriveRecord to get the field value from the related entity.

    However, since this is a good workaround to my initial question (i.e., how to auto-refresh page after flow), I will mark your suggestion as the suggested answer. Thank you!

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at
    RE: Auto Refresh After Flow Run & Field Value Change

    Hi D365 User 06,

    Yes as your power automate is running on the change of the lookup column. It might be the workaround to refresh the column.

    If I answer your question then please mark it as verified.

    Let me know if I can provide you with more details.

    Thanks
    Regards,

    Abdul Wahab
    Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

  • D365 User 06 Profile Picture
    70 on at
    RE: Auto Refresh After Flow Run & Field Value Change

     Hi Abdul Wahab,

    Thank you for your response. I went through the link you had provided on Opening the form again, so should I add this JS code on onChange event of the Lookup field to refresh the form?

    Thanks! 

  • Verified answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at
    RE: Auto Refresh After Flow Run & Field Value Change

    Hi D365 User 06,

    As per my understanding, your flow runs after the refresh action. In such a case, it will not be going to refresh. You need to write some plugin or JS to populate another column to see the instant change. You can do one thing more. Open the form again through openForm (Client API reference) in model-driven apps - Power Apps | Microsoft Learn .

    It might be sorted out your refresh after flow runs.

    If I answer your question then please mark it as verified.

    Let me know if I can provide you with more details.

    Thanks
    Regards,

    Abdul Wahab
    Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp:+923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 167

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 116 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans