Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to load a JS function when the form is refreshed?

(0) ShareShare
ReportReport
Posted on by 190

I have a model driven app and in the form i when one of the field is not null and the form is saved, i lock all the fields in the form.  But but if i hit the refresh button on the top, or if I go out to the view and go back into this record, all the fields are unlocked.  

How can i load a JS function to load when i refresh the page like described above?

  • Suggested answer
    bp3378 Profile Picture
    bp3378 190 on at
    RE: How to load a JS function when the form is refreshed?

    you are correct refreshing does activate the onload event.  I put a debugger alert every time it refreshes it loads the function.  I found out it was my other business rules and other javascript functions that are interfering with it.  Thanks.

  • bp3378 Profile Picture
    bp3378 190 on at
    RE: How to load a JS function when the form is refreshed?

    I did attach it to the onload event of the form.  I also attached it to the save event of the form.  But when I hit the refresh button on the top of the form the function does not load.   Is there anything such as a refresh event?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: How to load a JS function when the form is refreshed?

    Hi,

    You need to attach your function on onload event which will be triggered when form is refreshed.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,375 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans