Value Rule using Ribbon work bench mscrm 2013
Value Based Rule:
It will
be applicable for option set value. Based on the option set values the button
will be displayed.
How to do it:
- 1. Create a button and place it on the Form.
- 2. Provide Name, Description, Alternate Text etc. to the button.
- 3. Right click on “Display Rule” and Click on “Add New” option.
- 4. Once the rule name is created (ex: Rule id: demo.lead.DisplayRule1.DisplayRule), right click on it then select Add Rule option.
- 5. Select “Value Rule” from the options provided by the pop up winnow.
- 6. Right click on “ValueRule” provide Default: False, Field: your option set schema name (Ex: demo_status), Value: option set value (Ex: 737670000).
- When the option set value is “737670000” then the button will not be displayed rest other cases it will be displayed.
- 7. Go to command where you previously created and add this Display rule it as shown in the Figure: 2
- 8. On change of the MSCRM field call the below method to refresh the ribbon. function refreshRibbonOnChange(){
Xrm.Page.ui.refreshRibbon();
}
Comments
Post a Comment