cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mcutchins
Level: Powered On

Pull Lookup Fields into Canvas App

I need to traverse a Lookup field within the entity associated with the embedded canvas app and pull a select number of the Lookup entity's fields into the canvas.

 

For example, Contact is related to a Company, but I need the Company.Name, Company.Address Line 1, Company.State, etc onto the canvas app.  The canvas app itself is showing all the Contacts.First Name, Contacts.LastName already, but I can't get the Company lookup fields.

 

Can this be done within an embedded canvas app for Dynamics 365?

5 REPLIES 5
Community Support Team
Community Support Team

Re: Pull Lookup Fields into Canvas App

Hi @mcutchins ,

 

In which control that you cannot get the lookup field show? If you create an app automatically from an entity that contains a lookup field, it appears as a Drop down control that contains data from the Primary name field of the entity. Please try and see if this helps.

 

If I misunderstood anything, please feel free to correct me.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mcutchins
Level: Powered On

Re: Pull Lookup Fields into Canvas App

I should be more specific, I am trying to accomplish this within a Gallery not a Form.  I need to display a static list but use the data from a Lookup type field to traverse down to that level of data.

shawkinson
Level: Powered On

Re: Pull Lookup Fields into Canvas App

I have similar problem - I have the base entiry Opportunity and need to display the contact that is on the opportunity in the Gallery. Below is what I have tried so far, however no matter the formatting I can  not get it to work. Any help would be appreciated.

LookUp (Contacts,
Contact = LookUp(Opportunity, Opportunity.Opportunity = ThisItem.Opportunity,parentContactid.parentContactid),
'Full Name'


@mcutchins wrote:

I need to traverse a Lookup field within the entity associated with the embedded canvas app and pull a select number of the Lookup entity's fields into the canvas.

 

For example, Contact is related to a Company, but I need the Company.Name, Company.Address Line 1, Company.State, etc onto the canvas app.  The canvas app itself is showing all the Contacts.First Name, Contacts.LastName already, but I can't get the Company lookup fields.

 

Can this be done within an embedded canvas app for Dynamics 365?



@mcutchins wrote:

I need to traverse a Lookup field within the entity associated with the embedded canvas app and pull a select number of the Lookup entity's fields into the canvas.

 

For example, Contact is related to a Company, but I need the Company.Name, Company.Address Line 1, Company.State, etc onto the canvas app.  The canvas app itself is showing all the Contacts.First Name, Contacts.LastName already, but I can't get the Company lookup fields.

 

Can this be done within an embedded canvas app for Dynamics 365?


 

SaWu
Level 8

Re: Pull Lookup Fields into Canvas App

Hi @mcutchins 

I am not sure if I understand your question.

For just one "level" of LookUp fields, it's quite easy (at least with CRM 9.0 and a recent PowerApps version, 3.19091.18 at the time of writing this) to display fields from an entity that is linked via a LookUp field.
I just tried a simple example with the default "contact" entity which has a LookUp field "createdby" linking to the "systemuser" entity.
The "systemuser" entity has a display field "fullname" and a LookUp field "businessunitid" to the "businessunit" entity which has a display field "name".
In the following screenshot is a simple gallery that shows text fields from three nesting levels "contact", "contact.createdby", and "contact.createdby.businessunitid".
image.pngimage.pngimage.png
For multiple levels (beyond 1) of following LookUp fields, you get an error
image.png
which you can circumvent with a LookUp in the proper data source.
image.png
Apologies for the mix of logical names and display names.
PowerApps has this habit of changing some, but not all, logical names to display names upon saving.
You can easily add more Labels etc to the gallery template to populate with other fields from "contact", "contact.createdby", "contact.createdby.businessunitid", and of course other variations LookUp fields.

Best of regards,
    Sa Wu.

shawkinson
Level: Powered On

Re: Pull Lookup Fields into Canvas App

Apprecitate your reply. 

the problem I am having is that I am not able to pull the contact on the opportunity - I am able to pull the Account as well as other fields from the opportunity - see attached for Canvas App screenshot and D365 Customer engagement - it shows the account  and contact on the opportynity

Thanks for your help

Sigi Hawkinson

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,861)