How To List the Denial Reason(s) of Approvers in Denial Notifications

Version 1

    Details

     

    Customer may want to have the Reason(s) for Denied votes in the body of the Denial Notification. 

     

    The following article describes the process of carrying the Reason from ApprovalVoteTracking to Approval and then from Approval to it's ParentObject when the status of that vote is Denied. 

     


    Resolution

     

    Step 1:  Create the field that holds the denial reason.


    1. Go to Business Object FRS_ApprovalVoteTracking

      2. Add a new text field called DenialReasons (make text unlimited)

      3. Go to Business Rules in the same object

      4. Add an editing business rule

     

    a.      On Change: Reason

    b.     Set: DenialReasons

    c.      Name: Editing Rule for FRS_ApprovalVoteTracking.Denialreasons on update of Reason

    d.     Expression:

    e.      

    $(if Status == “Denied” Then Reason else null)

     

    f.       Click Save



    ***The field “DenialReason” only populates if the status equals denied.  DenialReasons and the Reason field are both in ApprovalVoteTracking  -This is done per the business rule just created above.

     

     

    Step 2: Next, we will need to create a field in Business Object FRS_Approval to hold the FRS_ApprovalVoteTracking.DenialReasons value.

     

    1.      Go to the Business Object FRS_Approval

    2.      Add a new text field called DenialReasons (make text unlimited)

    3.      Go to Business Rules in the same object

    4.      Add a new Before-Save rule

    a.      Field Name: DenialReasons

    b.     Name: Populate DenialReasons from FRS_ApprovalVoteTracking.DenialReasons

     

    $(ForEachChild("FRS_Approval#",

      RecId,

      "FRS_ApprovalVoteTracking#.Rev2",

      "DenialReasons + '\n'",

                           

      "OwnerFullName ASC"))



    ***This rule can be modified for having a better HTML aspect, for example the line break “\n” could be replaced for “<br>”, and the text could be formatted using the standard HTML tags

     

     

    Step 3: Add the DenialReasons field from FRS_ Approval to the notification. In this example, we will add the Denial Reason to the Out of the Box “Service Request Denial Notification”, a Quick Action in the Service Request object. 

     

    1.      Go to Service Request Quick actions and open up the quick action “Service Request Denial Notification“

    2.      Click Edit

    3.      In the Body of the email copy/paste or type the following into the email body.

    a.      $([FRS_Approval#.]DenialReasons)

             

    4.      Save quick action



    The only step that needs to be repeated to add the FRS_Approval.DenailReasons field to other notifications is Step 3. Just add $([FRS_Approval#.]DenialReasons) to any notification quick action to other business objects that you would like to show the denial reason for. (or add the field on a form)



    Once the Approval Status is set to Denied, this field will populate through the ForEachChild business rule we created in Step 2.  (Don’t confuse this with the individual vote approval tracking status being set to denied)

     

     

    Your notification should look like this: