cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DianaBirkelbach
Super User
Super User

PCF dataset method openDatasetItem Issue

Hi, 

 

I have a PCF of type dataset, and I tried to use the openDatasetMethod  as documented here (https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/dataset/opendatas...😞

I've tried this way:

dataset.openDatasetItem({id: {guid: event.recordId}, etn: dataset.getTargetEntityType(), name: event.title ?? "" })

I've checked the parameters in the console, and seemed ok for me:

image.png

I didn't saw any error, nothing in the console, but absolutely nothing happened.

 

Later on I took a sample from the sdk, and saw that it works this way (this one navigates to the record):

dataset.openDatasetItem(dataset.records[event.recordId].getNamedReference());

 

So I have a solution for now, but I would like to know if the first approach that I took was wrong. Maybe I misunderstood something...

 

Kind regards,

Diana

 

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DianaBirkelbach - the docs are not correct on this.

I have an open issue to correct this - https://github.com/MicrosoftDocs/powerapps-docs/issues/1465


In your case, I think you would pass:

{Id: event.recordId, LogicalName: dataset.getTargetEntityType()}

Hope this helps!

Scott

View solution in original post

1 REPLY 1

Hi @DianaBirkelbach - the docs are not correct on this.

I have an open issue to correct this - https://github.com/MicrosoftDocs/powerapps-docs/issues/1465


In your case, I think you would pass:

{Id: event.recordId, LogicalName: dataset.getTargetEntityType()}

Hope this helps!

Scott

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,457)