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
jlindstrom
Super User
Super User

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
jlindstrom
Super User
Super User

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (76,198)