Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Which entity/ribbon should I alter?

Posted on by 415

Hi dear reader,
I have this stubborn challenge that won’t leave me alone.

When I navigate to a custom entity, there’s an html5 url opening. Still, above this html5 page, I can see the standard buttons like “New activity”, “New record” and “Import data”.
I tried to alter those buttons using the Ribbon Workbench (eventually I want to add a new one, but just to be sure I’m on the right location), but for some reason I seem to be fidgetting in the wrong entity for no change that I publish can be seen after refreshing and opening the entity as described above.

Since the sitemap directly points to a html webresource, how should I find out which ribbon of which entity I should be altering (the entity field in the sitemap editor is empty)?

Thanks for thinking along with me.
Best regards,
Jeroen

*This post is locked for comments

  • Jeroen J Profile Picture
    Jeroen J 415 on at
    RE: Which entity/ribbon should I alter?

    Goutam, Abhishek,

    Thanks a million for your quick/prompt responses. I was hoping that I could have done this codeless, but if this is the verdict, so be it :-)

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Which entity/ribbon should I alter?

    Yes you need to write enable rule based on some value in the webresource and return true otherwise false so that button only display for the webresource only.

    Here is sample screenshot how to define enable rule -

    // Assume that you have a control with id "somecontrolID" in your html webresource so you can write blow enable rule in your javascript webresource 
    function SomeRule() {
        if (document.getElementsByTagName("somecontrolID") != null && document.getElementsByTagName("customersearchbutton") != undefined) {
            return true;    }
        else {
            return false;
        }
    }






    Once you ready with your web resource , open ribbon workbench with application ribbon solution and select the button --> select the command --> Add enable rule like below -

    2019_2D00_05_2D00_02_5F00_0_2D00_56_2D00_30.png

    2019_2D00_05_2D00_02_5F00_0_2D00_56_2D00_30.png

    Do publish .

  • Jeroen J Profile Picture
    Jeroen J 415 on at
    RE: Which entity/ribbon should I alter?

    Yes, I have. But still I'm "afraid" that it will show up in other locations since the application ribbon is entity indepentent (right?).

    As Abhishek advices, I could hide it conditionally. But if there's an entity specific ribbon that I could use, it would serve my needs better.

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Which entity/ribbon should I alter?

    Did you add the button in the application ribbon?

  • Verified answer
    Abhishek Gupta Profile Picture
    Abhishek Gupta 2,001 on at
    RE: Which entity/ribbon should I alter?

    HI,

    Follow this youtube video. It can help you to achieve that.

    https://www.youtube.com/watch?v=5_gnIQGLL0M&list=PLhgOm-Jpmt81tFK53ErsQm15y00m5p4R5

    Thank you

    Abhishek

    If found useful, please mark the answer as verified

  • Jeroen J Profile Picture
    Jeroen J 415 on at
    RE: Which entity/ribbon should I alter?

    Nothing fancy, just to add a new button that, if pressed, will show a new window with a specific view.

    The trouble is that I can't figure out where to add this button.

  • Abhishek Gupta Profile Picture
    Abhishek Gupta 2,001 on at
    RE: Which entity/ribbon should I alter?

    HI Jeroen,

    May i know. What are you basically trying to achieve?

    Thanks

  • Jeroen J Profile Picture
    Jeroen J 415 on at
    RE: Which entity/ribbon should I alter?

    It's defined in the properties of the SubArea in the sitemap:

    2019_2D00_05_2D00_01_5F00_14_2D00_25_2D00_12.jpg

    not really sure which of your options is applicable.

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Which entity/ribbon should I alter?

    How you are opening html page ? Is it inside crm  form ? If it's inside form then you can change  in the home area mentioned above Abhishek posted  screenshot. Otherwise if it's application ribbon then you have to write enable rule so that it's display when your html is rendered.

  • Abhishek Gupta Profile Picture
    Abhishek Gupta 2,001 on at
    RE: Which entity/ribbon should I alter?

    HI Jeroen,

    There are three layers when you open any entity in ribbon workbench. starting from bottom to top

    1) entity specific layer

    2) grid specific layer

    3) home

    In your case you have to work in bottom most layer.

    3157.upload.png

    Thank you

    Abhishek

    If found useful, please mark the answer as verified

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