
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/opendatasetitem😞
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:
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
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