lwc icon indicating copy to clipboard operation
lwc copied to clipboard

The getDataflowJobs @wire adapter does not filter correctly on datasetId

Open mamber98 opened this issue 2 years ago • 4 comments

Description

The getDataflowJobs wire adapter (https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_wire_adapters_get_dataflow_jobs) should be able to filter for all dataflow jobs given a specific dataflowId param, as defined in the doc linked. However, this wire adapter completely ignores the dataflowId param and returns all dataflow jobs regardless of their parent dataflow.

When I use the REST api to filter the dataflow jobs by dataflowId, it returns the expected dataflow jobs. However, when I try the same thing through the @wire adapter, the filter is not respected. Screen Shot 2022-04-19 at 3 38 33 PM

Notice, I'm using the same exact dataflowId in this code snippet as I did in the REST api call above.

    @wire(getDataflowJobs, {dataflowId: '02K1h000000SxDmEAK', licenseType: 'EinsteinAnalytics'})
    dataflowJobsHandler({data,error}) {
        if(error) {
            console.error(error);
        } else if (data) {
            console.log(data);
            console.log(data.dataflowJobs.length);
        }
    }

However, all 84 of my current dataflow jobs are returned, instead of the 40 dataflow jobs that belong to the provided dataflowId. Screen Shot 2022-04-19 at 4 58 11 PM

Steps to Reproduce

  1. Create a dataflow (or several) in CRM Analytics.
  2. Run a few of those dataflows to create several dataflow job records.
  3. Get the ID of one of the dataflows, and try to use the getDataflowJobs wire adapter with the dataflowId param attached. The dataflowId param will be completely ignored and all dataflow jobs will be returned. I've even tried this with completely invalid dataflowId's, expecting an error to be returned. But it was still ignored and all dataflow jobs were returned.

Expected Results

Dataflow jobs should be filtered by dataflowId.

Actual Results

dataflowId filter is ignored and all Dataflow jobs are returned.

Version

mamber98 avatar Apr 19 '22 23:04 mamber98

Hello @mamber98, Thanks a lot for your feedback. The working item corresponding to your issue was created for CRM Analytics. We will try our best to fix it in future releases.

rdubovetskyi avatar Apr 20 '22 18:04 rdubovetskyi

I'm seeing this same issue.

gmpmovies avatar Jun 14 '22 20:06 gmpmovies

Hi @mamber98 and @gmpmovies, We fixed it, and will deliver with 240 next release.

rdubovetskyi avatar Jun 14 '22 20:06 rdubovetskyi

@rdubovetskyi Great, thank you for the quick response! When is the next release?

gmpmovies avatar Jun 14 '22 22:06 gmpmovies

This is unrelated to LWC but was fixed as part of the Salesforce 240 release.

jmsjtu avatar Sep 19 '23 01:09 jmsjtu