
Hi all,
I'm currently creating a Flow that fires on the approval of a Leave Request, and it sends an email notification to the payroll manager if it's a specific leave type.
This Flow can be triggered several times as each Leave Request corresponds to each day in the request, so I added a field in the Leave Bank Transaction entity that allows me to check if the email has been sent or not. However, I can only find the corresponding Leave Bank Transaction entity using the Worker ID and checking the Transaction Date and Request Date against each other.
This means that if someone cancels their request and re-submits it, the email won't send as the flow only finds the previous Leave Bank Transaction.
Is there a way to find the specific Leave Bank Transaction associated with the Leave Request entities? According to the entity diagram (I'll put it below) they are only associated using the Worker and Company entities. Or am I misunderstanding exactly how these entities are associated with each other?
https://docs.microsoft.com/en-us/dynamics365/talent/media/hcmcommon-leave-entity-diagram.png
The Flow must trigger on the approval (cdm_status = "Approved" or "Completed") of a Leave Request.
Any help is greatly appreciated!
As you note, the leave bank transaction entity is a fairly simple entity that doesn't have a relationship with the leave request. There isn't a way to see what leave request is associated with a given transaction. What you are doing would be the only way to "connect" the two.