This blog article outlines how to add display rules for One-Click-Actions. The purpose of display rules is that users only see One-Click-Actions that are relevant to them.
More information about how to configure a One-Click-Action can be found here.
Please open your Dynamics 365 Settings, navigate to MSCRM-ADDONS-section and select DocumentsCorePack. In the main configuration window please go to the One-Click-Actions-tab. Select the entity for which you want to configure the one-click-action (in this case Contact) and hit the [Edit]-button.
In the so opened window, you are provided with all one-click-actions for the entity Contact. With a klick on the [+]-button on the right side, you can add a display rule for your one-click-action.
Display rules via security roles
In this example, we want to assign the “Send quote to customer via email” OCA to a security role by hitting the [+]-button.
In the window below, please select the security role that a user has to have to see this one-click-action. In this case, we select Customer Service Representative as you can see highlighted in yellow below. ONLY users with this security role will be able to see the OCA. If nothing is selected everyone will see the one-click-action.
Display rules via field values
You also have the possibility to add additional conditions as display rules. Therefore, please hit the [Advanced]-button at the bottom of the window above. Here you can find all attributes of the entity Contact. In this example we select Status and Active from the drop-down menu, which means that this OCA will ony be shown for contacts that are active as you can see in the figure below.
Please notice: If in addition to a field condition a security role is selected they are considered to be of type “AND”, which in our example, means that only users with the Customer Service Representative security role, that are on a contact with the status “Active” can see this one-click-action.
Figure 3: Define additional conditions to show the OCA
Display rules via Fetch
You may have seen that the solutions discussed so far are missing some features.
When you unable to create desired display rules using the above solutions, you can enable the [Use-Fetch]-toggle-button in the upper-right corner of the “additional conditions” popup window (Figure 3)
In the new window (Figure 4) you can enter XML instructions to set a more complex filter for displaying OCAs.
These XML statements can be generated from Advanced Search, or using additional third-party tools.
The OCA will be displayed as soon as the FETCH returns a result.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.