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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to add button dynamically in ribbon in MS Dynamics CRM?

(0) ShareShare
ReportReport
Posted on by

Hello,

I want to add button in the ribbon in Add New Record or Update Record Form. I can add using RibbonXML project. But I want to add dynamically on the base of selected modules.

For example, if I select Product and Case modules, the button should only display in Add/Update product and case.

This is possible as there are already some plugins are providing this kind of functionality.

Here is example: appsource.microsoft.com/.../mtccrm.cf7661c4-254c-4de4-a342-15b82f419620

I want to add buttons dynamically.

Using Ribbonworkbench, I need to open solution --> I need to select entity --> Drag new button from tool panel given on the left --> Publish. I need to do this for each entity. I want to make this dynamic.

It should work like this: I have list of entities with checkboxes. If user check the checkbox for Product and Case entity, buttons should display for Product and Case entity records. If I check one more entity 'Order', it should display button in Order form also.

I understand that I need to code to add this. But I don't know what/where I need to code.

Can somebody please guide me? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    from my experience you can dot it easily with the RibbonWorkbench: www.develop1.net/.../ribbonworkbench.aspx

    You can implement a custom enable Rules (ootb or with Javascript). Just be careful that the ribbon permission are only downloaded one time (onLoad), i.e. if you think that checking this box will show you the button dynamically. You are wrong. You will need to reload the entire record. :)

  • Community Member Profile Picture
    on at

    Hi,

      As per my understanding it can't be done dynamically. What you can do is put Enable Rule or Display rule to show or hide as per your need.

  • Community Member Profile Picture
    on at

    Hi Guillaume Domont,

    I want to add buttons dynamically.

    Using Ribbonworkbench, I need to open solution --> I need to select entity --> Drag new button from tool panel given on the left --> Publish. I need to do this for each entity. I want to make this dynamic.

    It should work like this: I have list of entities with checkboxes. If user check the checkbox for Product and Case entity, buttons should display for Product and Case entity records. If I check one more entity 'Order', it should display button in Order form also.

    I understand that I need to code to add this. But I don't know what/where I need to code.

    Please guide.

  • Community Member Profile Picture
    on at

    Hi Raghu Yogesh,

    To do this, first I need to add button for each entity of CRM. How can I add for each? Using drag and drop in Ribbonworkbench? Poor idea I think.

    After performing above step, yes I can make is show/hide by Display rule.

    Actully, I also thought that adding button dynamically is not possible but I have seen in one pluing of AppSource as I have mentioned link in question.

    Please suggest.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    from my experience, yes you need to add it for all the desired entities. Then what you can do, is to create a configuration entity where you will save all your needs. Then when a form is open you do a WEbApi call to check if the user should or not see the buttons.

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi Chatya,

     you can use application ribbon to add the button:

    www.itaintboring.com/.../application-ribbon-in-dynamics-or-how-can-we-add-a-button-to-all-entity-forms

     Although, you will still need to set up a customrule (using javascript) that will control if that button is enabled or not (if it's not enabled, it'll be automatically hidden)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans