Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Hide Oob button On Grid

Posted on by 335

Hello

i want to hide edit and remove button on grid, like on account  i have two grid has 1:N has relationship with contact and second has N:N with contact son on second one when user select record i want to hide edit and remove button on that grid only how can i do this?can anyone help me?

Thanks & Regards

  • Yash Trivedi CRM Profile Picture
    Yash Trivedi CRM 335 on at
    RE: Hide Oob button On Grid

    ya i am calling it from contact subgrid ribbon

    see this

    5127.con_5F00_edit1.PNG

    con_5F00_edit2.PNG

    and i am geting this error on SelectedControl.getRelationship.name()

    Uncaught TypeError: SelectedControl.getRelationship is not a function

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Hide Oob button On Grid

    Hi,

    You will need to call your code from Contact Entity subgrid ribbon button.

    what do you get in selectedControl.getRelationship().name?

    Please mark my answer verified if i were helpful

  • Yash Trivedi CRM Profile Picture
    Yash Trivedi CRM 335 on at
    RE: Hide Oob button On Grid

    Hy Bipin thanks for  replay

    in selectedcontrol parameter of Mscrm.EditSelectedRecord command i am getting 'account' entity 

    here is screenshots

    7875.edit2.PNG

    Edit1.PNG

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Hide Oob button On Grid

    HI,

    You could write Javascript to check subgrid name and based on the name you can hide button from one subgrid and show in other.

    xrmdynamicscrm.wordpress.com/.../

    Pass selectedcontrol CRM parameter from ribbon workbench as a parameter and then use below code to get relationship name.

    selectedcontrol.getRelationshipName();

    blog.magnetismsolutions.com/.../filter-n-n-add-existing-lookup-dynamics-365-v9-supported-code

    Please mark my answer verified if i were helpful

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans