Hi there!
I'm looking to trigger a Flow whenever an Approval is assigned to me. I've created a trigger "When a new record is created" in CDS, but can't find the field where it shows who the approval was assigned to. Owner appears to be the same as the person who created the approval.
I've also looked in the Approval Requests entity, and Approval Responses (just for fun) and didn't see anything there, either.
Any help is appreciated.
Thanks!
-Ed-
Solved! Go to Solution.
Hi @edgonzales ,
This is what you need to do. Approval requests are assigned to owner field. So next step you need to Get record from user entity against the owner to find user email, name, etc.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Hi @edgonzales
Great question
Tried and tried and tried
It is the Owner field in the Approval Response entity that has the value of the person who took the action
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @edgonzales ,
This is what you need to do. Approval requests are assigned to owner field. So next step you need to Get record from user entity against the owner to find user email, name, etc.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Reza,
Thanks. I am looking for who the approval was assigned to (before any action is taken)...only considering active/pending requests. Ultimately want to filter and only trigger an action for approvals that have my ID in the 'assigned to' (or whatever it's called) field.
Thanks again.
-Ed-
Hi @edgonzales
Great question
Tried and tried and tried
It is the Owner field in the Approval Request entity that has the value of the person who took the action
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Are we sure that the Owner = the Assigned To? In my testing, I was always the owner regardless of who I assigned the Approval to through the front end. Also, it feels like the Owner field is 1:1, when the Assigned to can be a group, no?
Let me know what you think.
Thanks!
-Ed-
Hi @edgonzales
It is the Owner field in the Approval Request entity that has the value of the person to who the task is assigned
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @edgonzales ,
Yes owner is assigned to. I did tested with two different email address. Looks like it is 1:1 relation.
Approval can only support to one individual email address or multiple which is separated by semicolon. In my knowledge it won't support group address.
For the trigger to identify after adding the flow steps (Ref: my screenshot below) you need Get my profile and identify the email address compared with Get record - user email address match.
The disadvantage is flow will trigger for others request apporoval as well.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Ok, I confirmed. I missed the "Requests" part of your screenshots above so when @RezaDorrani reiterated I went back and tested.
I'm curious how it handles multiple email addresses? It must generate a new request for each, then, right? So a single Approval will have multiple Requests? I can see this getting fun.
I'm ok with the extra runs, I was hoping using the criteria inside the trigger would keep that from happening, but I don't think there is any way around that.
Thank you, both, for the help.
-Ed-
Hi @edgonzales
Yes it generates multiple rows for each person assigned
Glad it worked out
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
85 | |
72 | |
44 | |
26 | |
25 |
User | Count |
---|---|
42 | |
25 | |
23 | |
23 | |
17 |