Skip to main content

Notifications

Announcements

No record found.

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. 

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: How to capture tab load event and perform task

    HI,

    We have another event which can be attached to tabs.

    docs.microsoft.com/.../tabstatechange

    Please mark my answer verified if i were helpful

  • kcp_7 Profile Picture
    kcp_7 5 on at
    RE: How to capture tab load event and perform task

    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
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to capture tab load event and perform task

    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

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,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans