Please refer to the screenshot below.
- EnableRules/DisableRules - These should be added to the CommandDefinition section of the customization file. There must also be a corresponding entry in the RulesDefinition section of the customization file.
- CommandDefinition EnableRule Id - Add an id here that uniquely identifies the rule that you are adding
- CommandDefinition DisplayRule Id - Add an id here that uniquely identifies the display rule that you are adding
- RuleDefinitions EnableRule Id - This should match the EnableRule Id added in step #2.
- RuleDefinitions EnableRule CustomRule - This once again references a custom jscript function that will determine whether to enable or disable the button. I chose to reference the "default" contact library but this could be any jscript library.
- RuleDefinitions DisplayRule Id - This should match the DisplayRule Id added in step #3.
- RuleDefinitions DisplayRule FormStateRule - This tells the form that the button should only be displayed on "Existing" forms i.e. the update as opposed to the create form.
- Function CustomEnableRule - The function in the example above must be created in the relevant jscript library and should match the FunctionName from the CustomRule section
If there were more "involved" considerations for the DisplayRule, we could of course have also created a custom jscript function to allow for greater manipulation of this rule. Refer to the CRM SDK for more configuration options.
No comments:
Post a Comment