cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Get Approval Assignment through Common Data Service

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-

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Get Approval Assignment through Common Data Service

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.

 

ds1.png

 

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

9 REPLIES 9
Highlighted
Super User
Super User

Re: Get Approval Assignment through Common Data Service

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

 

 

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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.

 

ds1.png

 

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



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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-

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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

Super User
Super User

Re: Get Approval Assignment through Common Data Service

 

@abm 

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-

 

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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

 

 

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Super User
Super User

Re: Get Approval Assignment through Common Data Service

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-

Super User
Super User

Re: Get Approval Assignment through Common Data Service

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

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 78 members 3,729 guests
Please welcome our newest community members: