Hi,
We have 3 entities in Dynamics 365:
1. Contact
2. Screen Criteria
3. Progress Data
Progress Data is the child of Contact and Screen Criteria entities i.e. Progress Data has lookups of Contact and Screen Criteria.
For the given Contact record, we are fetching all the related Progress Data records as follows:
ClearCollect(tblTempProgressData,
Filter('Progress Data',
ThisRecord.Contact.lna_contactid = GUID(varContactID)
)
);
This works good and loads all the related Progress Data records in tblTempProgressData collection. Now I want to add two columns named "Screen Name" and "Screen Order" with the data from related entity records Screen Criteria into the each rows of collection tblTempProgressData and I have written following lines of code:
ClearCollect(tblProgressData,
AddColumns(
tblTempProgressData,
"Screen Name",
LookUp(
'Screen Criteria',
'Screen Criteria' = tblTempProgressData[@'Criteria'].'Screen Criteria',
'Screen Name'
),
"Screen Order",
LookUp(
'Screen Criteria',
'Screen Criteria' = tblTempProgressData[@'Criteria'].'Screen Criteria',
'Screen Order'
)
)
);
Criteria is the lookup name of Screen Criteria entity in Progress Data entity.
This code doesn't seem to be working as "Screen Name" and "Screen Order" columns in tblProgressData has no values. It would be very helpful if some one could let me know what's wrong here and what is the correct way of doing this?
Thanks