cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Delegation Warning with CDS Connector

Using the CDS Connector, I'm trying to filter a custom CDS entity called "Links" with the account GUID from the account entity. 

However, I get a delgation error on Profile field.  How can I return all of the link records for that specific Account?

 

Filter(Links, Links.Profile = First('ModelDrivenFormIntegration'.Data).AccountId)

 

Thanks for your help in advance!

Justin

9 REPLIES 9
Highlighted

Re: Delegation Warning with CDS Connector

Hi @Langyamps ,

 

Can you share a little bit more of your scenario. Perhaps with some screen shots.

Getting relational data is quite easy with the CDS connector, because it retreives relational data automatically. 

But how to do that depends on your scenario. 

Highlighted
Regular Visitor

Re: Delegation Warning with CDS Connector

Hi @Rebetcha ,

I’m attempting to embed a canvas app in the Profile (account) form and I’d like to display a gallery of the associated “Link” Records.  There is a N:1 relationship between the Profile and Link entities.  The account id is being passed into the PowerApp with the ModelDrivenFormIntegration.Data

Should be doable right?  There are 800,000 Link records for that entity.

 

Delegation.png

Highlighted

Re: Delegation Warning with CDS Connector

Hi @Langyamps ,

 

Thanks for the clarification,

You state that you want to display a list of associated Link records for a Profile but next thing state that the relationship is N:1 between Profile and Link entities. I think you mean 1 Profile to N Link entities in this case?

 

Regarding your formula:

Filter ( Links, Links.Profile = First( ModelDrivenFormIntegration.Data ).AccountId )

 

2 things I notice immediately:

You use the Data property from the ModelDrivenFormIntegration and you use a filter to try to get the correct AccountId information. 

In the documentation off the ModelDrivenFormIntegration control properties it says:

DataRead-only property used by the framework to send some key data from the host model-driven form to the embedded canvas app.
Do not use this property. Use Item to access the record from the host model-driven form.

 

And this is exactly the answer to your issue. 

Read the info about the Item property from the same article:

ItemRead-only property that enables the embedded canvas app to access the record from the host model-driven form.
As an example, to get the value of a field with the name accountnumber and display name Account Number, you can use ModelDrivenFormIntegration.Item.accountnumber or ModelDrivenFormIntegration.Item.'Account Number'.

 

So, the Item property gives you all the information of the currect account record without having to do a filter operation.

 

Taking this information into consideration my guess is your formula should look something like this:

Filter ( Links, Links.Profile = ModelDrivenFormIntegration.Item.AccountId )

 

Highlighted
Regular Visitor

Re: Delegation Warning with CDS Connector

@Rebetcha Thanks so much for replying!
I read through the documentation provided and attempted to use the Item property instead of data, but it was not resolving at all.  Finally, I started over with a new report, and now the item property is available. It also appears to be able to access other related entities as well, which is great!

 

I figured I would still pursue the original goal of filtering a CDS Entity with a GUID.

I attempted to hard code a GUID into the Filter, but seems to throw an error as well.  Could it be that there is an issue with filtering GUIDs on custom relationships?  I had seen posts where other people was having trouble as well.

GUID Lookup Error.png

Thanks!

Highlighted

Re: Delegation Warning with CDS Connector

Hi @Langyamps ,

 

It could be multiple issues. The screenshot of your formula shows a red squiggly line below the = indicating that PowerApps cannot perform this comparison. Usually this is an indication that the data types that you try to compare do not match up. It can be a pain in the b to get to the bottom of something like this, but I have a few tricks up my sleave for that.

 

My first suggestion now would be to turn on an experimental feature for your app: "Enable formula bar result view".image.png

This feature will not only show the evaluated output of (parts of) your formula, but also shows the data type of selected parameters. 

After you turn this feature on please select Links.Profile part of your formula in the top formula bar and share here what kind of data type the results view shows.

Highlighted
Regular Visitor

Re: Delegation Warning with CDS Connector

Hi @Rebetcha,

 

That feature is awesome!

It shows that i'm passing the accountid as a GUID.  But the Links.Profile is saying Table.  Which is confusing me.

I tried to explicitly pass the schema name of eb_profile1id, but that didn't work at all.  

 

Delegation 2.pngDelegation 3.png

 

Highlighted

Re: Delegation Warning with CDS Connector

Can you share a screen shot from your CDS showing the entity with the specifics for the profile field?
Highlighted
Regular Visitor

Re: Delegation Warning with CDS Connector

Sure!  

It looks like I’m making progress.

I did think this was possible, but I specified the relationship and in the designer, it shows the related Link records in the table.  This is what I want.

However, when I save and publish the app, it does not load the data into the gallery in Dynamics.  Only seems to work in App designer.

 

 

Delegation 4.png

 

This shows retrieving the related Link records - similar to what I was trying to do with the Filter.

Delegation 5.png

Highlighted

Re: Delegation Warning with CDS Connector

Check the view in Dynamics you are using. The fields you want to show in your embedded app should be part of the view. 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,498)