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 CRM (Archived)

Tab focus function for unified interface not working

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Shahbaaz Ansari Profile Picture
    6,211 on at

    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

  • Whitey@Work Profile Picture
    on at

    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.

  • gdas Profile Picture
    50,091 Moderator on at

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

  • Whitey@Work Profile Picture
    on at

    They do. Confirmed!

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    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
    on at

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

  • JoshuaKim Profile Picture
    15 on at

    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
    on at

    Sorry, no solution to-date.

  • Community Member Profile Picture
    on at

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

    formContext.getControl(arg).setFocus();

  • Verified answer
    Whitey@Work Profile Picture
    on at

    Yes, I resolved this myself.

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

    contextObj.setDisplayState("expanded");

    This should be documented!

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans