locked
MSCRM 2013 : enable or disable Ribbon buttons RRS feed

  • Question

  • Hi ,

    Can some one please provide the inputs for how to disbale the EDIT, ACTIVE , DELTE , COPY LINK and EMAIL A LINK buttons when no records are selected for Account entity , if record is selected I need to enable the above buttons.

    As I'm new to 2013, as I came to know some of the blogs about 2013 Ribbon custiomization  we can't disbale the buttons if we want to disable the button it will be  hiding.

    Please let me know is this the a limitation of CRM 2013? or is there any approch we can achieve this?.

    Thanks,

    Rahul.




    • Edited by Rahul-22 Wednesday, November 19, 2014 11:32 AM
    Wednesday, November 19, 2014 11:31 AM

Answers

  • Hi Rahul,

    In CRM 2013, With the command bar, commands that are disabled are hidden

    Go through the msdn link :

    http://msdn.microsoft.com/en-us/library/gg334682.aspx


    • Marked as answer by Rahul-22 Thursday, November 20, 2014 9:46 AM
    Wednesday, November 19, 2014 5:01 PM
  • Hi Rahul,

    You can define various Enable rules and Display Rule.

    Try to achieve the requirement by using Entity Privilage Rule Display Rule.If it is not possible you can go ahead with 'CustomRule' in Enable Rule.

    In custom rule, You can provide javascript function to control the Enable\Disable

    In the javascript function you can use something like this :

    function CheckPrivilage() {
    if(UserHasRole("Security Role"))
    {
    return true;
    }
    else
    {
    return false;
    }
    }

    }

    Thanks,

    Seban

    • Marked as answer by Rahul-22 Thursday, November 20, 2014 11:16 AM
    Thursday, November 20, 2014 11:11 AM

All replies

  • Hi Rahul,

    In CRM 2013, With the command bar, commands that are disabled are hidden

    Go through the msdn link :

    http://msdn.microsoft.com/en-us/library/gg334682.aspx


    • Marked as answer by Rahul-22 Thursday, November 20, 2014 9:46 AM
    Wednesday, November 19, 2014 5:01 PM
  • Hi Mathews,

    Thanks for the Response.

    Can I hide or disbale EDIT, DELETE ,ACTIVATE, COPY A LINK  and EMAIL A LINK command buttons for more than one security roles?

    I have some of security roles like Sales Person , Sales Manager and Sales Marketing Manager roles.
    For above roles i need to show the command buttons else i need to hide the buttons.

    Thanks,





    • Edited by Rahul-22 Thursday, November 20, 2014 9:55 AM
    Thursday, November 20, 2014 9:52 AM
  • Hi Rahul,

    You can define various Enable rules and Display Rule.

    Try to achieve the requirement by using Entity Privilage Rule Display Rule.If it is not possible you can go ahead with 'CustomRule' in Enable Rule.

    In custom rule, You can provide javascript function to control the Enable\Disable

    In the javascript function you can use something like this :

    function CheckPrivilage() {
    if(UserHasRole("Security Role"))
    {
    return true;
    }
    else
    {
    return false;
    }
    }

    }

    Thanks,

    Seban

    • Marked as answer by Rahul-22 Thursday, November 20, 2014 11:16 AM
    Thursday, November 20, 2014 11:11 AM
  • Seban,

    Thanks for the quick response 

    Let me work on this... :)

    It will make sense.

    Thanks,



    • Edited by Rahul-22 Thursday, November 20, 2014 11:16 AM
    Thursday, November 20, 2014 11:16 AM
  • In enable rules add SelectionCountAtLeastOne rule to enable buttons on selection of at least one record.
    Tuesday, November 25, 2014 12:59 PM