Views:

Overview

The Quick Ribbon App from North52 is a ready-go-to solution for Microsoft Dynamics 2013/2015/2016/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 Ribbon WorkBench. You can also get Ribbon WorkBench from XrmToolBox

You can see a video demonstrating how to set all of this up on our YouTube channel below (note the video shows how to use the Classic Editor whereas the instructions in this article use a Decision Table - the outcome is the same).



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.

Step 1: Configure the N52 Formula

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

  • 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
      • Click on Cloned Quote to add the text GetVar('Cloned Quote')
    • Parameters: Leave blank
    • Click Generate
  • Click Save

Step 2: Add the Quick Ribbon to the entity using Ribbon Workbench.

Open the Workbench and connect to your instance of Dynamics 365.

We have created a solution with just the Quote entity added to it. 

Command

Configure a Command by clicking on the + icon. We change the name to new.quote.N52.CloneCommand.

 
We will be adding 4 JavaScript Actions to this button. 

 The first three will be used to load N52 support files on the button and the fourth will be used to execute the formula.

  • $webresource:north52_/javascript/n52.rest
  • $webresource:north52_/javascript/n52.json2 
  • $webresource:north52_/javascript/n52.clientside

The function name should be set to isNaN 

 
The fourth Javascript Action will use $webresource:north52_quick_ribbon.js and the function should be set to N52QuickRibbon.ExecuteFormulaOnForm


It will take a single String Parameter and this is the shortcode of the North52 Formula you want to execute - in this example we are using s8q.

Button

Drag a button onto the form. We set the ID to be  new.quote.N52.CloneButton and name it Clone Quote.
Set the Command to be the newly created command. For this example, we will use the icon on Start Dialog button for Clone Quote button. We copy out the image link from the Dialog Button and paste it into the image field on the button.

/_imgs/ribbon/startdialog_16.png
/_imgs/ribbon/startdialog_32.png




Publish the Solution.

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.