The subgrid is for opportunity entity. The same subgrid is shown on two places, on Accounts and on Opportunities (as child opportunities).
The request is that New Opp button should be visible only on Account form, the same should not be visible on Opp form.
We have tried with two approaches, the first one is display rule:
http://bds-experts.com/ribbon-changes/
But that is not working.
The second approach we tried is this:
https://siddiquemahsud.blogspot.com/2020/04/hide-ribbon-button-on-subgrid-for.html
The issue is that New button is shown on Opp sugrid both on Account and Opp form.