web
You’re offline. This is a read only version of the page.
close
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 capture tab load event and perform task

(0) ShareShare
ReportReport
Posted on by 5

I have a requirement to perform task on tab load.

Like if user clicks on "summary" tab, I need to show an alert after the tab fully loaded. How can we have control over tab load event. 

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Krishna,

    You can add js as web Resource and add it to tab OnChange event.

    Here are steps.

    1.Go Settings > Customization > Customize the System > Web Resource to click new button.

    pastedimage1604025254262v1.png

    js code:

    function FormLevelNotification(executionContext) {
        var formContext = executionContext.getFormContext();    
        formContext.ui.setFormNotification("Example of an ERROR notification. ", "ERROR");
        formContext.ui.setFormNotification("Example of a WARNING notification. ", "WARNING");
        formContext.ui.setFormNotification("Example of an INFORMATION notification.", "INFO");    
    }

    2.Go Settings > Customization > Customize the System > Entities > Forms.

    (1) open one main form and click Form Properties to open a dialog.

    pastedimage1604025277699v2.png

    (2) click Add button to add js that just created.

    pastedimage1604025289530v3.png

    (3) Under Event Handlers, select ‘Summary’ as control and add the js, then double-clcik it to open Handler Properties dialog.

    pastedimage1604025301014v4.png

    3.Save and publish.

    4.Test.

    pastedimage1604025311157v5.png

  • kcp_7 Profile Picture
    5 on at

    Hi Leah,

    As checked, this actually not fulfilling my requirement. I want to have control over tab load event so that I can perform task based on the events occuring on tab load.  So basically when the "summary" tab fully loaded, that's when I want to perform task.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    HI,

    We have another event which can be attached to tabs.

    docs.microsoft.com/.../tabstatechange

    Please mark my answer verified if i were helpful

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 46 Most Valuable Professional

#2
Pallavi Phade Profile Picture

Pallavi Phade 33

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 28 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans