Skip to main content

Notifications

Announcements

No record found.

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,959 Super User 2024 Season 1 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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,684 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,414 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans