Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Tab focus function for unified interface not working

Posted on by

Trying to achieve focus on a tab in the new V9 unified interface and the tab focus function is fully documented but nothing happens.
Debugging proves the below function executes but focus is not shifted to the tab in the UI.

Anyone tested or has a valid workaround?

        let tabResultsObj = formContext.ui.tabs.get("tab_search_result");
        if (tabResultsObj) {
            tabResultsObj.setFocus();
        }


*This post is locked for comments

  • Verified answer
    Whitey@Work Profile Picture
    Whitey@Work on at
    RE: Tab focus function for unified interface not working

    Yes, I resolved this myself.

    Use the tab expanded function and it sets that tab in focus.

    contextObj.setDisplayState("expanded");

    This should be documented!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Tab focus function for unified interface not working

    Any update, setFocus is not working on an attribute in CRM 9.0 UI

    formContext.getControl(arg).setFocus();

  • Whitey@Work Profile Picture
    Whitey@Work on at
    RE: Tab focus function for unified interface not working

    Sorry, no solution to-date.

  • JoshuaKim Profile Picture
    JoshuaKim 15 on at
    RE: Tab focus function for unified interface not working

    Have same issue since we moved to new UUI early this year. It's perfectly working on the normal version but not UUI.

    Did you find any solution?

  • Whitey@Work Profile Picture
    Whitey@Work on at
    RE: Tab focus function for unified interface not working

    Thanks. However the tab only contains a subgrid and no attributes and there is no focus on subgrids or sections.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Tab focus function for unified interface not working

    I am not sure about your requirement , but try to focus any control inside tab . I hope it will do the same  , instead of focusing directly tab.

  • Whitey@Work Profile Picture
    Whitey@Work on at
    RE: Tab focus function for unified interface not working

    They do. Confirmed!

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Tab focus function for unified interface not working

    I would suggest debug your code make sure formcontext and control you are getting.

  • Whitey@Work Profile Picture
    Whitey@Work on at
    RE: Tab focus function for unified interface not working

    I'm sorry but did you not look at my code sample?

    XRM.Page is depreciated, so I already have tested with my sample code using the new Xrm classes.

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Tab focus function for unified interface not working

    Hi Whitey@work,

    You can set the focus on tab by using below code in V9,

    Xrm.Page.ui.tabs.get("tab_3").setFocus();

    Also Refer : community.dynamics.com/.../223454

    Best Regards,

    Shahbaaz

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans