Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Get the selected subarea label from navigation

Posted on by 50

I'm trying to get the text from a selected subarea from the navigation.

Please see the image below

pastedimage1663760057631v1.png

Any help here?

Thank you in advance

  • Ricardo Jacobsen Profile Picture
    Ricardo Jacobsen 50 on at
    RE: Get the selected subarea label from navigation

    That solution of creating new buttons I saw already, was wondering if I could do it in an easier way with JavaScript by getting the selected subarea.

    Thank you anyway for the response.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get the selected subarea label from navigation

    Hi Ricardo,

    Unfortunately, you can't achieve it.

    Maybe you can add two custom button(one named +New organization and another named +New household) in the Account ribbon bar.

    then call js code to open different main form in these two custom buttons.

    Reference:

    https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openform 

    https://www.cloudfronts.com/blog/d365-enterprise/adding-a-button-on-ribbon-and-on-click-opens-quick-create-form-using-ribbon-workbench-in-xrm-toolbox/ 

  • Ricardo Jacobsen Profile Picture
    Ricardo Jacobsen 50 on at
    RE: Get the selected subarea label from navigation

    This is because I have two main forms for the same entity, "account".

    One is organization and the other is household.

    When I click in the Organization or Household subarea it will open the view for the organization or House hold. That is the correct behaviour.

    But when I click on the button inside of the view to create a new organization or household, the form that will show up will be the last selected instead of the main form based on the type of account.

    Like this 

    pastedimage1665025620073v1.png

    Should open organization main form, but opened the last selected (In this case household).
    pastedimage1665025877908v2.png


    So the only solution that I thought of, would be get the selected subarea text via and based on this open the correct form via javascript.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get the selected subarea label from navigation

    Hi,

    What do you mainly want to get it for?

    In general, they are the plural form of the entity name!

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans