Hi everyone
My goal is to send an reminder email, every day at 8AM, to approvers who have outstanding approvals.
I am using the modern approval CDS approach, where the first flow creates the approval and writes it to the Common Data Service. The second flow kicks in when the statuscode in the Approvals entity changes (i.e. the approval has been actioned).
My first approach was to filter the Approvals entity by records that have a blank Outcome. This returns the correct records.
Unfortunately, the owner of the record is the requestor and not the approver. I then went to the Approval Requests entity, where the owner of the record was the assignee.
My knowledge about CDS entities and the logic behind them stops here.
First, the records in Approvals and Approval Requests are not synchronised. I have a handful of active approvals in Approvals, but there are hundreds in Approval Requests. How come there are records that have been marked as inactive in Approvals but they remain active in Approval Requests? Is this intended?
Second, how do I use the Update a Record action to get the correct record from Approval Requests? When I use the Approval Id as the unique id, it can't find anything. Is my only option to return the whole list and then filter by Approval Id Index?
Thank you for your help!