Overview
There are many scenarios when you need to build custom dialogs to meet your business requirements. With the North52 business rules engine we make it easy to create a custom dialog using standard forms and North52 functions.
In this example we are going to replace the out-of-the-box Close Opportunity functionality which can't be modified via configuration. For another example of updating multiple Opportunities via a custom dialog form, see this knowledge article.
https://www.youtube.com/watch?v=nRf-sZrvTrE
Rules for Custom Close Opportunity Dialog
| Rule # | Description |
|---|---|
| 1 | When a user selects an Opportunity from the main grid they can Close the Opportunity using a custom ribbon button and custom form. Clicking the button opens a dialog form with Won/Loss, Actual Amount and Actual Close Date fields set to required and the Loss Reason field hidden. |
| 2 | The user can choose to select whether to close the Opportunity as Won or Lost. |
| 3 | If Won is selected the Actual Amount and Actual Close Date fields are required and the Loss Reason field is hidden. |
| 4 | If Lost is selected, the Actual Amount is set to zero and disabled, and the Loss Reason field is shown and set to required. |
| 5 | The user then clicks the North52 Quick Button Close Opportunity, which calls a North52 Formula to create an Opportunity Close records using the values supplied in the form. After processing has completed the window is closed. |
North52 Decision Suite Solution
The North52 Decision Suite solution works like this (note you need Business Process Activities v1.0.0.642, Quick Button v9.30 and Quick Ribbon v9.30 or later to build this functionality):
- A custom form is set up on the Opportunity table which is configured with a North52 Quick Button
- A custom ribbon button is set up to open the custom form using the North52 Quick Ribbon functionality
- A Formula is set up on the Opportunity Form which after being opened with the custom ribbon button:
- Sets initial field values and requirements on load
- Set field values and requirements on change of the Win/Loss field
- A Formula is set up on the Opportunity table which is called by the North52 Quick Button:
- Creates an Opportunity Close record with the values from the form passed into the Formula from the Quick Button
- Once the Opportunity Close record has been created the Formula closes the custom dialog form
Set up Custom Form, Ribbon Button, and Formulas
There are multiple components needed to build the custom dialog form to close an Opportunity. The steps are outlined in the following sections.
Custom Form
The custom form will be opened as a dialog window to allow the user to input values. It will not save data like a traditional form as we only use it to capture information to be passed to a Formula which then processes the information. The steps to allow this to happen are outlined below:
- Create a new Main Form called Custom Close Opportunity Form
- Remove tabs and sections so that the form has only a single tab and section
- To remove required fields from the form e.g. Owner, add a column to a Tab and move all required fields to this column. Then remove the column from the Tab. The required fields will be removed with the column.
- Rename the remaining section to Complete the details below to close this Opportunity
- Create a new Single Line of Text field called Bulk Edit Guids, add it to the form and check the Hide option - this will be used to contain the Opportunity GUID of the selected record in the main grid
- Create a new Choice field with the two choices Won and Lost, and add it to the form
- Add the existing fields Actual Revenue and Actual Close Date to the form
- Create a new Multiple Lines of Text field called Loss Reason, add it to the form and check the Hide option (it will be shown by a Formula if the Lost option is selected)
- Add a HTML Web Resource and select North52 Quick Button Unified Interface web resource (the North52 Quick Button solution needs to have been previously installed)
In the Custom parameter data field enter (See the North52 Quick Button documentation for details on these parameters):
Sav


