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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to check if a page is loaded completly

(0) ShareShare
ReportReport
Posted on by 120

I need to triger a function when my page is load completely 

readyState === "complete"

How do I do that? should I use event listener ?

would be happy to get an example.

I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi damka,

    Did you check the link; https://stackoverflow.com/questions/48259669/how-to-make-sure-load-complete-in-crm-page?

  • Verified answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    you can use the formContext.data object to check if a page is fully loaded. The formContext.data object has a getIsLoading() method that returns a Boolean value indicating whether or not the page is still loading.

    Here's an example of how you can use the formContext.getIsLoading() method to check if a page is fully loaded:

    var intervalId = setInterval(function(){
        if(!formContext.data.getIsLoading()){
            // Page is fully loaded
            clearInterval(intervalId);
            // Perform additional actions after the page is loaded
        }
    }, 1000);

    In this example, the setInterval function is used to check the formContext.data.getIsLoading() method every 1 second. Once the page is fully loaded and the getIsLoading() method returns false, the clearInterval function is called to stop the interval and the additional actions that you want to perform after the page is loaded can be implemented.

    It's important to note that when you are creating forms or web resources that interact with the form, you should wait for the form to be fully loaded before interacting with the form controls to avoid any errors or unexpected behaviors.

    Additionally, Dynamics 365 CRM also fires events when a form is loading, saving, closed and so on, that you can use to check the state of the form and perform specific actions accordingly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans