we have a requirement at a customer for which I assume we would need some custom WebResource or a PCF if possible. The requirement is as follows:
A user has to be able to create a report by entering for which Work Order he wants to run a report and for which timeframe (a week mostly). Next, the form should display time entries, expenses and installed machines during that period. The user shows this information to the customer and they agree upon the work delivered. On that form they fill out the remarks and the customer signs off digitally. All of this information should be stored once the report is approved or disapproved.
We would solve as follows:
- user adds a report and a report form opens
- when specifying the workorder (s)he clicks save
- a webresource or pcf control is displaying the data from other entities (msdyn_expense, ...)
I dont see value in preparing the data (and already storing on a report for which you dont know it will be finalized). Also, I could be able to generate it on the fly using RetrieveMultiple plugins, but I'm not really into that idea since they run for each query, also outside that report. Setting fetchxml with client side script would be unsupported. Virtual entities is possibly not useful since it would display data from the same instance and has to work mobile?
The option I think would be most suitable, is a custom WebResource which fetches the data on the fly via Web API. I was wondering the same could be done with a PCF control. The PCF control could be fetching the data based on input parameters for the query, and would be reusable for all grids. But since PCF controls need to be bound to a dataset, I doubt if this could be an option. There isn't an actual dataset until the report is being finalized.
Something custom would also allow us to show other data on the report that cannot be easily displayed using OOTB components/data retrieval.
Is using PCF an option or are there other options available that we didn't think of yet?