Skip to main content
Dynamics 365 general forum
Answered

Get the selected subarea label from navigation

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

Attachments
  • 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 UG Leader 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 UG Leader 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!

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,126 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,646 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans