web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to show hide the buttons on the subgrid basis on subgrid name?

(2) ShareShare
ReportReport
Posted on by 429
Hi,
I have two custom entities Legal entity  and ownership entity, legal entity contains the subgrids of ownership entity and I am using ownership subgrid two times on the legal entity because I have two lookups of legal entity on the ownerhsip form, one is parent legal entity(Ownership), second is child legal entity(subsidiary). so using these two relationship I have added two subgrid of ownership entity on legal entity level.
I have created two QC form of ownership entity, for ownership subrgid I will open the ownership QC form and for subsidiary subgrid I will open the subsidiary QC form.  To achieve this I have created two custom buttons on the ownership entity subgrid level and added two js function to open the QC forms and that is completely working fine, each button is opening the respective QC form. 
Requirement: I need to show only ownership button on ownerhsip subgrid and Hide the subsidiary button, and need to show the subsidiary button on subsidiary subgrid and hide the ownership button. I have created two enables rules for this to handle the show hide.
 
Issue: Both button is visible on both the subgrid. as I have added the condition with subgrid name and view id as well but still the same condition is getting true for both the subgrids even after checking the particular subgrid name as well.
 
Please provide any solution for this or any alternative way to achieve this functionality. 
I have the same question (0)
  • Suggested answer
    Jimmy Passeti Profile Picture
    777 Most Valuable Professional on at
    Hello,
     
    The only way to do this is by using JavaScript. Use the Selected Control parameter.
     
    and in JavaScript code, use it this way:
    selectedControl._controlName
     
    This will give you the internal name of the section.
     
     
    Regards,
    Jimmy Passeti | Microsoft MVP
    ✅ Please mark as Verified if this answered your question!
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 109 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 39

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans