Views:

Scenario Overview

In this scenario we will demonstrate how to set up a ClientSide Decision Table that you can use to set various notifications on an Opportunity.

For this article it is assumed that you have at least basic familiarity with Decision Tables and/or have read the following articles:

Note: We will not detail step-by-step instructions here on how to set up Conditions or Actions, please read the above articles if you need detailed configuration steps.

In this example we are going to trigger ClientSide functions on the Opportunity based on data in the Parent Account.

The Business Rules

If there is a Credit Hold on the Parent Account
  • Display a Form Notification warning the user
  • Disable all fields on the form
If the Budget Amount for the Opportunity is larger than the agreed Credit Limit for the Account
  • Display a Form Notification informing the user
  • Set focus on the budget amount field

N52 Formula Manager Solution

The Formula Manager solution works like this:

  • A client-side Decision Table is set up to trigger onload or change of the Account and Budget Amount fields of the Opportunity form
  • If the Credit Hold field on the related Account is Yes a message (Form Notification) is displayed to the user 
  • If the Budget Amount for the Opportunity is larger than the agreed Credit Limit on the related Account then a message (Form Notification) is displayed to the user

N52 Formula Manager Steps

The following set of steps outline how to create this Formula:

  • Create a new formula, setting the following values in the Formula Guide
    • Source Entity set to Opportunity
    • Set Formula Type to Clientside - Perform Action
    • Select the Decision Table editor
  • Change the Name of the Formula to Opportunity - ClientSide - Notifications 
  • Expand the Source and Target section on the Register tab
  • Ctrl-click to select the Source Property values for the Opportunity form, represented by *** Opportunity Events *** within the Source Property list (Note: if you see an error message about duplicate form names you made need to rename the Opportunity quick create form so that each form has a unique name, as this is required for North52 BPA):
    • OnLoad
    • Account 
    • Budget Amount
  • Click in cell A2, select the Source tab and click on Budget Amount under the Source node
  • Right click in column B and select Insert > Insert Condition
  • Click in cell B2, select the Source tab, expand the Related (N:1) > account (parentaccountid) > Attributes nodes and click on Credit Hold {Value}
  • Click in cell B4, and expand the Credit Hold {Value} node from the last step and select Yes,
    • Note : the text TRUE will be inserted into the cell if you are running an old version of North52
  • Click in cell C4, select the Functions tab, enter SetFor in the search field and press enter
    • Shift-click the SetFormNotification function to open the function wizard
    • Leave the Friendly Name field blank as we are going to insert the function directly into the cell for this example. If we wanted to show a more friendly name and move the function logic to the Global Actions sheet we would enter a name here and select Action from the Type drop down
    • In the Message field type This account has an existing Credit Hold on it
    • Select ERROR for the Level
    • Enter msg1 in the UniqueID field
    • Click Generate
  • Right click in column and select Insert > Insert Action
  • Click in cell D4, select the Functions tab, enter Disable in the search field and press enter
    • Shift-click the DisableFields function to open the function wizard
    • As before leave the Friendly Name field blank
    • Type * in the Fields input box, the * indicates all fields on the form
    • Click Generate
  • Click in cell A5, type > followed by a space 
  • Leaving the cursor in cell A5, select the Source tab, expand the Related (N:1) > account (parentaccountid) > Attributes nodes and click on Credit Limit.
    •  [opportunity.parentaccountid.creditlimit.?] is added to the cell
  • Click in cell C5, select the Functions tab, enter SetFor in the search field and press enter
    • Shift-click the SetFormNotification function to open the function wizard
    • As before leave the Friendly Name field blank
    • In the Message field type This Opportunity budget is higher than agreed Credit Limit
    • Select INFO for the Level
    • Enter msg2 in the UniqueID field
    • Click Generate
  • Right click in column and select Insert > Insert Action
  • Click in cell E2, select the Source tab and click on Budget Amount under the Source node
  • Click in cell E5, select the Functions tab, enter SetFocus in the search field and press enter
  • Ctrl-click the function SetFocus
  • Copy cell A5 to A6 and replace > with <=
  • Click in cell C6, select the Functions tab, enter clear in the search field and press enter
    • Shift-click the ClearFormNotification function to open the function wizard
    • As before leave the Friendly Name field blank
    • Enter msg2 in the UniqueID field. By using the same messageID as before, we will clear any message previous set with that messageID
    • Click Generate
  • Click Save
  • From the N52 Commands menu in the Formula form navigation bar, select Publish Formula to bind the formula to the onload and onchange events selected for the Opportunity form

Testing

Test the Decision Table by changing Account and related Opportunity record data.

Below you can see the the Decision Table in action. When the Credit Hold is set to Yes on the Parent Account the notification is displayed on the Opportunity and all the fields have been disabled.




When the Budget Amount is greater than the Credit Limit on the Parent Account