Hi All,
I have an embedded canvas app on the CRM Form. I need to get the lookup value of a field.
The relationship is as follows -
"Entity A has a lookup of Entity B on it"
"Entity B has a lookup of Entity C on it"
The embedded canvas app is on Entity A
I need to get the "Entity C" value inside the embedded canvas app.
I tried the below things -
1) Set the below formula on the "onvisible" property of the form screen
ClearCollect(EntityBRecord,LookUp('EntityB','entitybid'=[@ModelDrivenFormIntegration].Item.'LookupofEntityBonEntityA'.'id');
2) Placed a label on the form and set it text property to First(EntityBRecord).Name
But the label does not display anything 😞
Moreover I need to check if the "Entity C" lookup on "Entity B" has a value, if yes, then make the display mode of the field "Disabled" otherwise "Editable".
formula pseudocode for the datacardvalue-
If('Entity C contains data',Parent.DisplayMode.Disabled, Parent.DisplayMode)
Kindly provide any guideliness/syntax on how to achieve this.
Any help would be appreciated.
@Poweruser1101
Can you try this for the OnVisible property of the form screen?
Set(gblContextualRecord, LookUp(EntityA, ID = [@ModelDrivenFormIntegration].Item.ID);
ClearCollect(EntityBRecord, LookUp(EntityB, ID = gblContextualRecord.LookupOfEntityBonEntityAID))
And you can then use this to check if EntityC has data:
If(IsBlank(First(EntityBRecord).EntityC.ID), DisplayMode.Disabled, Parent.DisplayMode)
Let me know if this works.
---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions.
Thanks!
Hardit Bhatia
Microsoft Business Applications MVP
Microsoft Certified Trainer MCT
Blog | Twitter | LinkedIn | Facebook | YouTube | Email
User | Count |
---|---|
225 | |
101 | |
93 | |
56 | |
30 |
User | Count |
---|---|
286 | |
116 | |
109 | |
62 | |
57 |