Hide activity ribbon button based on custom field value RRS feed

  • Question

  • Hi

    On the home page and sub-grid views of a custom activity I need to hide\disable 'Mark Complete' button based on the value of a custom filed on the form.

    I tried with ribbon workbench application but no luck. Added a custom ‘Enable Rule’  of type ‘Custom Javascript Rule’  to the ‘Mscrm.SaveAsCompleted’ Command but does not trigger. Passed  ‘Crm parameter=Selected EntityTypeName’ to check if it is the activity type I want and then pop up a test alert message. And then if possible check the value of the custom field.

    What I would like is only for a custom activity type entity to have the ‘Mark Complete’ button visible based on a custom filed on the form. Is this even possible?

    Any help and suggestions much appreciated.

    Thank you 

    • Edited by _cram Monday, December 7, 2015 5:26 PM
    Monday, December 7, 2015 5:23 PM

All replies

  • Hi,

    Use ValueRule to enable/disable the ribbon button.


    Hope it helps.

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in

    Tuesday, December 8, 2015 5:37 AM
  • Hi

    Thanks for the reply.

    I have used the following 'EnableRule' with 'OR'rules:

    Where the 'EntityRule' is the following:

    And the 'ValueRule's :

    Value Rule 1Value Rule2

    And it does not work.

    If I only use the the 'EntityRule' under the 'EnableRule' (no 'Or' rules and no 'ValueRule' rules) the 'Mark Complete' button it does not show for the custom entity, but shows for all the other activities in crm. Which I am happy with. But now if I could , for the custom activity entity, only show 'Mark Complete' button if the value of the custom field is 100000000, otherwise don't show it.

    thank you

    Tuesday, December 8, 2015 10:33 AM
  • Check display rule:-


    Regards Faisal

    Tuesday, December 8, 2015 11:53 AM