Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Show/Hide tabs in form via subgrid

Posted on by Microsoft Employee

hi all,

I have two subgrids of the same view on a entity.

subgrid 1 is -- entity A

subgrid 2 is also -- entity A

 subgrid 1 and subgrid 2 are present in a parent entity(say, entity X which has 1:N with Entity A),..

now when I click on subgrid 1 add new button the entity form opens up, but It should hide tab1 and display tab2.

and when I click on subgrid 2 add new button the entity form opens up, but It should hide tab2 and display tab1.

Note : Subgrid 1 and Subgrid 2 are from same entity

How do I achieve this .

Thanks

*This post is locked for comments

  • Verified answer
    TNS Profile Picture
    TNS 1,195 on at
    RE: Show/Hide tabs in form via subgrid

    hi..

       if you want to hide a tab2 and make visible tab 1 when you click on subgrid1 add new button then you can write a js code behind a button like :

       Xrm.Page.ui.tabs.get("yourtab1name").setVisible(true);

       To hide a tab:

      Xrm.Page.ui.tabs.get("yourtab2name").setVisible(false);

    and viceversa for subgrid2 add new button..

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