cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeterDonohue
Advocate II
Advocate II

Approval Result in Gallery

Here's another interesting one 🙂 I am firing off an Approval Flow using PowerAutomate from my app. I'm connected to the Approvals, Approval Requests and Approval Ressponses connectors from the CDS.

I'm trying to figure out how I can show the approval status and assignee in a gallery with my requests. 

 

The title of the request is using the title of the project - that's the only common thing that I have

 

I'm trying to link the projects (sharepoint items) and the approvals in a collection but I'm pretty lost hahaha

1 ACCEPTED SOLUTION

Accepted Solutions

The only official documentation for the CDS approval entities is https://support.microsoft.com/en-us/help/4559582/guidance-for-custom-solutions-using-approvals-data-.... Heed the warning on it that the schema is not publicly documented, is complex, and is subject to change.

 

With that in mind, every approval has a record in the msdyn_flow_approvals entity. The owner of that is the person who created the approval. Each approver will have a record in the msdyn_flow_approvalrequest entity.

 

If they have responded to the flow there will be a msdyn_flow_approvalresponse record.

 

There is a common ID that ties these together. MSDYN_flow_approvalID on the approval entity

The lookup to approval on the approval request entity is msdyn_flow_approvalrequest_approval

the lookup to approval on the approval response entity is msdyn_flow_approvalresponse_approval

 

Approvals that are pending are statecode (Status) Active, Approvals that are complete or terminated are statecode (status) inactive.

 

With this information, you should be able to show approvals in your app. For example, if you wanted pending approvals and you wanted to show approval requests related, you could do a gallery of approval records and a subgallery of approval request records.

 

@PeterDonohue  if this answers you question, please mark it as a solution.

View solution in original post

2 REPLIES 2

The only official documentation for the CDS approval entities is https://support.microsoft.com/en-us/help/4559582/guidance-for-custom-solutions-using-approvals-data-.... Heed the warning on it that the schema is not publicly documented, is complex, and is subject to change.

 

With that in mind, every approval has a record in the msdyn_flow_approvals entity. The owner of that is the person who created the approval. Each approver will have a record in the msdyn_flow_approvalrequest entity.

 

If they have responded to the flow there will be a msdyn_flow_approvalresponse record.

 

There is a common ID that ties these together. MSDYN_flow_approvalID on the approval entity

The lookup to approval on the approval request entity is msdyn_flow_approvalrequest_approval

the lookup to approval on the approval response entity is msdyn_flow_approvalresponse_approval

 

Approvals that are pending are statecode (Status) Active, Approvals that are complete or terminated are statecode (status) inactive.

 

With this information, you should be able to show approvals in your app. For example, if you wanted pending approvals and you wanted to show approval requests related, you could do a gallery of approval records and a subgallery of approval request records.

 

@PeterDonohue  if this answers you question, please mark it as a solution.

View solution in original post

Thanks mate. I think you've explained what I was getting at 🙂 Cheers

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,750)