rwilson504 / PCFControls

Reusable PowerApps Control Framework (PCF) controls.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dataset empty on initial load

dkasp opened this issue · comments

commented

This is for the Calendar control, I've also tested this with the latest version (1.1.0.59)

calendarDataSet is empty ( context.parameters.calendarDataSet.sortedRecordIds.length is 0) when control is loaded initially - re-selecting the view where the control is configured will correctly retrieve the dataset. Console Output looks like this:

// initial load
updateView: updatefromOutput: false
2index.ts:81 updateView: updatefromOutput: false
index.ts:111 updateView: dataSet.sortedRecordIds.length: 0
CalendarControl.tsx:241 asyncCalendarData: dataSet.sortedRecordIds.length: 0
CalendarControl.tsx:547 getCalendarData: eventData.length: 0

// re-selected view
index.ts:81 updateView: updatefromOutput: true
index.ts:81 updateView: updatefromOutput: false
index.ts:111 updateView: dataSet.sortedRecordIds.length: 223
CalendarControl.tsx:241 asyncCalendarData: dataSet.sortedRecordIds.length: 223
CalendarControl.tsx:547 getCalendarData: eventData.length: 223
index.ts:81 updateView: updatefromOutput: false
index.ts:111 updateView: dataSet.sortedRecordIds.length: 223

I'm assuming you are using this in a Canvas app. Are you attempting to attach the calendar directly to a CDS dataset or are you loading that dataset into a collection and then attaching that collection to the calendar? If you are connecting directly to a CDS data set i have found this issue too. I believe it's due to a bug in PCF for canvas apps where it says the dataset is loaded before it really is. I would make sure you are loading your dataset into a collection.

Make sure to take a look at the README for how to connect up the collection

commented

I'm using the Calendar in our CRM Online (Customer Engagement) instance as a custom control in a model-driven app, on a regular view.
The control worked great up until last week, and I've made sure the configuration is set up correctly. When I re-select the view, data is retrieved and displayed correctly, too.

But I agree with you that this is most likely a bug in PCF, which is why I've also created an issue with Microsoft support. Seems like the behaviour from canvas is spreading to model. I'll let you know once (if) Microsoft comes up with anything useful.

What solution version for the Calendar are you using by the way?

commented

I'm using the latest version, 1.1.0.59, now - used to be an older version (1.1.0.38), but I updated to make sure the issue wasn't already fixed.
I ran that version through my VS (with no changes) to get a solution.

@dkasp Are you still having issue? Also is your Model App been upgraded to the Unified Client Interface (UCI) or is it an old school app?

Thanks,

Rick

commented

Hi Rick,

just checked, looks like MS fixed the issue on their end. We're using UCI btw.