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

Table Grid Dataset Component Sample

I am trying to build my first Dataset component. I took th ecode from the Table Grid sample component to get started. That code however is not working. I am getting the following errors. (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/table-grid-...)

 

 

I figured perhaps it was a capitalization error and changed it to below and get more errors. Anyone know what is going on here?

Annotation 2019-11-06 105651.png

9 REPLIES 9
John742
Level: Powered On

Re: Table Grid Dataset Component Sample

First Error was:

Annotation 2019-11-06 110435.png

AllanDeCastro
Level: Powered On

Re: Table Grid Dataset Component Sample

Hello,

Can you try with the following in attachment ?

 

 
AllanDeCastro
Level: Powered On

Re: Table Grid Dataset Component Sample

I tested my component and it looks like they are a problem with the getNamedReference().
Using this code:

                        console.log("CLick on :"+ entityReference.id);
                        let entityFormOptions = {
                            entityName: <string>entityReference.etn,
                            entityId: entityReference.id.toString(),
                            openInNewWindow: true
                        }
                        console.log("Object: "+entityFormOptions);
                        console.log("Object Etn : "+ <string>entityReference.etn);
                        console.log("Object Id: "+ entityReference.id.toString());
                        this._context.navigation.openForm(entityFormOptions);
                        console.log("Open :"+ entityReference.id);



So the etn properties returns an undefined value.

 

image2.png

 

 

 

 

Bhuvita
Level: Powered On

Re: Table Grid Dataset Component Sample

@John742 

Did you find the solution for this ?

 

I am also facing the same issue

John742
Level: Powered On

Re: Table Grid Dataset Component Sample

Unfortunately, I did not.

Power Apps Staff HemantG
Power Apps Staff

Re: Table Grid Dataset Component Sample

I downloaded the latest samples and also refreshed the CLI using "PAC install latest" and was  able to build the control and see it in the test harness. 

 

Check the change in the latest code for the sample for the lines you pointed out as error 

 

 let entityFormOptions = { entityName: entityReference.etn!, entityId: entityReference.id.guid, };
 
 
hemant 
 
 
 
 
Bhuvita
Level: Powered On

Re: Table Grid Dataset Component Sample

@HemantG 

I have install the latest CLI.

etn is still not available. Please see the attached screenshot.

 

ben-thompson
Level 8

Re: Table Grid Dataset Component Sample

@Bhuvita Can I jump in and add 3 screenshots instead of 1

 

This is sample typescript code - note no issues reported

code1.png

 

 

this is the same code inside a chrome debug window

 

chrome1.png

 

 

and here is confirmation that the current library that .etn is undefined in the current Western Europe (CRM4) region

chrome2.png

 

It seems that there is an issue somewhere between the typescript library and type definitions and the library being served from within the organisation.

 

Now for the moment you can fix it by using

 

code2.png

 

and in copy format

 

var entityReference=<any>currentRecord.getNamedReference();
let entityFormOptions={
    entityName: entityReference.etn || entityReference.LogicalName,
    entityId:entityReference.id
};

 

 

with confirmation here

 

Screenshot_41.png

 

 

But I wouldn't really want to be introducing hacks like this.

 

It's annoying that both Microsoft's document and Microsoft's Typescript Component Framework definitions say one thing while the actual production code says something else.

 

Bhuvita
Level: Powered On

Re: Table Grid Dataset Component Sample

@ben-thompson 

yeah right now I am just ignoring the typescript like this.

bug1.PNG

 

 
 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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