How to display lookup field value while displaying records in Canvas Application.

Hello Guys,

This blog will explain you how you can display lookup field value while displaying records in Canvas Application.

We know that there are some limitation of using canvas application. One of the scenario is when we display a list of records for any entity which is having any lookup field then if we try to display that lookup then we are not able to display its value instead it's GUID is displayed.

For Example. Consider a scenario we need to display all the Contacts along with its Accounts using a List. Here Account is lookup field on Contact entity so we will be displaying its Name or Value. So first of all we will be creating a canvas application.

Step 1:- Click on https://make.powerapps.com/.


Step 2:- Click on Canvas app from blank.


Step 3:- Specify App name. Select Format of the app which you want and click on Create.


Step 4:- Rename the Screen1 as "LstContact". 
From the Menu select Insert -> Gallery -> Vertical.



Now we will bind this Gallery2 with contact list. To do so select Gallery2 -> Properties -> Expand Connectors -> Select Dynamics 365 -> Make a connection 
-> Choose a datasets -> Choose a Table -> Select Contact -> Connect.


Step 5:- Now from the tree view select Titile1 and set it's Text property.


Step 6:- In the same way we will be selecting Subtitle1 and will set its Text Property.


You can see here when we bound SubTitle1 with "Company Name", it is displaying GUID where as we want Company name or Account name should be displayed. To achieve this we will modify Text property as below:



Step 7:- Save and Run the application.


Hope It helps...

Comments

Post a Comment

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.