Views:

Overview

The Quick Ribbon App from North52 is a ready-go-to solution for Microsoft Dynamics 365 that allows you to call a North52 Formula from the Ribbon on a form. You can download the Quick Ribbon App here.

It consists on a single JavaScript web resource that you connect using the Command Designer.

In this article we will demonstrate how to clone a Quote using Quick Ribbon and have it automatically open the newly cloned quote.

The Ribbon button will call a North52 Formula of type ClientSide - Calculation. This type of formula can carry out an action and then return a result back to the calling screen.

Note 1: Quick Ribbon requires that you have North52 BPA Version 529 or later installed. 

Note 2: After version 1.0.0.530 North52 supports calling other formula types like this, but only ClientSide - Calculation will allow you to return a response to the calling screen.

Compatible Versions

North52 Decision SuiteQuick Ribbon Version
1.0.0.6061.10
1.0.0.6101.11 
1.0.0.6169.16

Step 1: Configure the North52 Formula

The below formula will clone the existing Quote, and then pass the instruction back to the form to open the newly created clone.

North52 business rules engine for Microsoft Power Platform - Decision Table

  • Create a new formula, setting the following values in the Formula Guide
    • Source Entity set to Quote
    • Set Formula Type to ClientSide - Calculation
    • Select the Decision Table editor
    • Click the Create button
  • Change the Name of the formula to Quote - Clone - Quick Ribbon
  • Click Save
  • Right-click in column A and select Delete > Delete Column
  • Right-click again in column A and select Insert > Insert Table Calculation
  • Replace the Set Name placeholder text with Cloned Quote
  • Select cell A4
  • Select the Functions tab, type clone into the Search functions input box and press enter
  • Shift-click the Clone function to open the function wizard
    • Ignore the Friendly Name field as we are going to insert the function directly in the Decision Table
    • Entity Name: Select Quote from the search list
    • Record ID: Select Quote from the search list
    • Child Records: Select quote_details from the search list (this will include the Quote Products associated to the Quote in the cloning operation)
    • Enable Prefix: Leave set to true
    • Click Generate
  • Select cell B4
  • Select the Functions tab, type open into the Search functions input box and press enter
  • Shift-click the OpenEntityForm function to open the function wizard
    • Ignore the Friendly Name field as we are going to insert the function directly in the Decision Table
    • Entity Name: Select Quote from the search list
    • ID: Select the Source tab
      • Expand the Decision Table Calculations node
      • Expand the DecisionTable node (Decision Table's have a node for each sheet, in this case the sheet is called DecisionTable by default, unless you choose to rename it. If the sub node is not showing click the Refresh icon 🔄 at the top of the Source pane)
      • Click on Cloned Quote to add the text {Cloned Quote}
    • Parameters: Leave blank
    • Click Generate
    • NOTE: if the function has single quotes around '{Cloned Quote}' then remove them so that the function in cell B4 is OpenEntityForm('quote',{Cloned Quote})
  • Click Save 

Make sure to note the shortcode of the formula as you will need this when you use Ribbon Workbench.

Step 2: Add the Clone Button using the Command Designer

  • Open the model-driven App which has the Quote entity in edit mode
  • With Pages selected from the left navigation bar, click the ellipses icon and select the Edit Command Bar option:
  • Choose the Main form option and click the Edit button
  • Select New > Command
  • Select JavaScript from the dialog
  • Set the Label to Clone
  • Set the Icon to Use Icon
    • Select the Clone icon
  • Action should be set to Run JavaScript
  • Under Library, click Add Library 
    • Search for Quick Ribbon
    • Select North52 Quick Ribbon
    • Click Add
  • Set the Function Name to N52QuickRibbon.ExecuteFormulaOnForm
  • Click Add parameter
    • For Parameter 1 select PrimaryControl
  • Click Add parameter
    • For Parameter 2 select String and Enter the Formula Short Code in the text box, in our case this is gFP
  • The Command Editor will look like this:
  • Click Save and Publish
  • Click Play

Quote Record on Dynamics 365

When we open a quote record on Dynamics 365 we will see the Clone Quote button listed on the Ribbon:

Click the ribbon button, the quote is cloned and the new quote opens.

Confirmation Dialog

It is possible to include a confirmation dialog in a Quick Ribbon on a form. To do this you would simply add another string parameter to the Quick Ribbon containing the text you want to display. In this example, before executing the formula gFP, we will ask the user Are you sure you want to clone this Quote?


A pop up dialog will ask me to confirm that I want to do this:

When they click OK the formula will execute, if they Cancel then the formula will not be called.

Processing Message

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