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

Create a HTML table from Dynamics 365/ CDS data (accessing data from related fields too)

Hi, 

 

In this post we will build a flow to create a HTML table from Opportunity entity. One of the requirements is to get the Account Name in a column. 

The account field is a lookup and references to the GUID when referred to fromthe opportunity entity. We will see how we can access the account field label (accountid). 

Steps: 

1. Select the trigger of your choice. 

2. Select the action "List records from Dynamics 365" -> Select the organization and select the Opportunitites entity. -> write any custom queries as you want

3. Initialise an array variable with null value

4. Select an apply to each condition and select the "value: list of records" from the dynamics content as an input to the loop

5. Within the loop, add the Get Records from Dynamics 365 action -> Select the organization -> Select the "Account Entity" -> Select the "Account" field from the dynamic content list of "List of records" option.  // this step can be replicated for any related entity, ensure using the appropriate record identifier to access the record. 

6. Within the loop, add the Append to Variable Array action -> Select the arra you initialised -> in the values part type the json and select appropriate values (refer to the screenshot)

{
"Account Name": (select the Account Name option from the Get Records list in the dynamic content selector), 

"Opportunity Topic" : (select the Topic option from the List Records list in the dynamic content selector)

(repeat the same steps as above for all the desired fields)

}

7. Now add a new step out of the loop and select the create a HTML table option -> select the array in the from option of the create HTML table ation. 

 

hjhjhj.png

 

If this post 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!

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: 426 members 5,853 guests
Please welcome our newest community members: