This is a follow on article from Execute Formula - Button on Form (Unified Interface).
In this article we will attach a ribbon button to a list view on Dynamics 365.
Note: After version 126.96.36.1990 North52 supports calling other formula types like this, but only ClientSide - Calculation will allow you to return a response to the calling screen.
There have been significant changes introduced in the Unified Interface around the use of web resources. Quick Ribbon v1.11 is the minimum supported version required to run in the Unified Interface after December 1st 2020. This requires that you are also using North52 v188.8.131.520 as well.
|North52 Decision Suite||Quick Ribbon Version|
Step 1: Configure the N52 Formula
The formula below will clone the existing Quote:
Step 2: Add the Quick Ribbon to the entity using Ribbon Workbench
- Open Ribbon Workbench and connect to your instance of Dynamics 365
- We have created a solution with just the Quote entity added to it:
- Configure a Command by clicking on the + icon. We change the name to new.quote.N52.ListViewCloneCommand
- Unlike the form, we will be passing in 5 parameters instead of just two.
- Crm Parameter: PrimaryControl
- Crm Parameter: SelectedControlSelectedItemsIds
- Crm Parameter: SelectedEntityTypeName
- Crm Parameter: UserLcid
- String Parameter: shortcode of the formula
- Drag a button onto the form. We set the ID to be new.quote.N52.ListViewCloneButton and name it Clone Quotes
- Set the Command to be the newly created command.
- The final step we need to add for a Ribbon Button on the Unified Interface is a SelectionCount rule. Detailed instructions for this are located here
- Publish the Solution
If you want to add an icon to your button in the Unified Interface it will need to be of type svg. In this example I am using one I already added as a web resource called new_cloniconsvg. It will need to be specified in the 'ModernImage' field on your button.
Note: You can download svg icons from various sites on the internet or convert existing images into them using tools. When you have your svg icons ready, you will need to added them as web resources to your Dynamics instance and then you can use them in your ribbon buttons.
List of Quotes in Dynamics 365
- In the screen capture below, there are 8 quote records. We select them all and then click on the Clone Quotes ribbon button
- When we refresh the list we can see that all 8 quotes have been duplicated:
It is possible to include a confirmation dialog in a Quick Ribbon on a list view.
- To do this you would simply add another string parameter to the Quick Ribbon containing the text you want to display
- In the example below, before executing the formula GFW, we will ask the user if they are sure that they want to charge this customer:
- This additional string parameter has been added to the button: Close & Charge
- A pop up dialog will ask me to confirm that I want to do this action:
- Clicking OK will execute the formula. If Cancel is clicked then the formula will not be executed.
By default North52 Quick Ribbon will display a message on screen when the Ribbon button is clicked (v9 systems and above) that will say Processing..
If you want to add a custom message, then you can add an additional parameter to the Quick Ribbon command:
Note: If you want to display a processing message without configuring a confirmation message, set the middle string parameter to NoOp
Below you can see the display message.
Note: In the list view North52 will post-fix a count to show how many of the records have been processed.