I have a Request Offering that needs 1:n approvals. I want to have a quick action that will send an email out that shows the names of all the people who have approved the request. The business object ServiceReq (Service Request) has a relationship to FRS_Approval (Approval). The FRS_Approval DB table holds the ServiceReq RecId in the ParentLink_RecID field. The FRS_Approval business object has a relationship to FRS_ApprovalVoteTracking. FRS_ApprovalVoteTracking holds information on who approved the request. FRS_Approval holds information on whether the request was approved or denied. I would like to include in the email, all persons who approved the request.
The following expression (1) returns all RecId's for each approved status..
$(ForEachChild("ServiceReq#", RecId, "FRS_Approval#", 'if Find("Approved", Status) != -1 then RecId else ""'))
...as one long string, I might add.
The following expression (2) returns the approvers' full name for a given RecId...
$(EvalField("FRS_ApprovalVoteTracking#", "161723400F944BC1A243CF458B90A61F", "OwnerFullName"))
Somehow I need to get the RecId of (1) into the RecId of (2) - so I tried...
$(EvalField("FRS_ApprovalVoteTracking#", "(ForEachChild("ServiceReq#", RecId, "FRS_Approval#", 'if Find("Approved", Status) != -1 then RecId else ""')", "OwnerFullName"))
...but that didn't work (didn't think it would be that easy)
Can someone show me how to get all the approvers' names into an email being sent from service request quick action?