locked
hide mark complete ribbon menu RRS feed

  • Question

  • hello i want to hide the mark complete ribbon menu button when selected lookup value is "waiting"

     

    i dont know how to do it by using javascript?

     

    thx...

     

     


    Software Specialist Crm
    Thursday, November 17, 2011 2:39 PM

Answers

  • Hi,

    You will need to do two things to achive this scenario

    1. You will have to override the CommandDefinition of the out of box mark as complete button. to do this, either you can hide the existing button and create your own button with the same command definition but updated Enable Rule or create a new command definition with the same id as the out of box one. The enable Rule has to define a custom enable rule which checks the status "waiting"

    2. The ribbon content will evalute the custom enable rule when a record is selected in the grid. In order to force the ribbon to refresh when another record is selected, you will need a javascript which forces ribbon refresh

    Xrm.Page.ui.refreshRibbon();
    

    Thanks,

    Thursday, November 17, 2011 11:55 PM

All replies