Deploying Analytics Dataset in scratch-org throws "Insufficient access rights on cross-reference id"
Hi all,
I don't have much experience with Analytics, especially deploying it's metadata (Wave) components, so I'm wondering if anyone else can help here.
What I am trying to do?
Create a scratch org and deploy Analytics (wave) metadata.
What analytics metadata?
An analytics app with a dashboard, dataset and dataflow.
Components of my Wave folder:
Some_Dashboard.wdash
Some_Dashboard.wdash-meta.xml
Some_Analytics_Dataflow.wdf
Some_Analytics_Dataflow.wdf-meta.xml
Some_Analytics_App.wapp-meta.xml
VoiceCall_Dataset1.wds-meta.xml
VoiceCall_Dataset1.xmd-meta.xml
Errors:
VoiceCall_Dataset1 - insufficient access rights on cross-reference id
HVCC_Dashboard1 - insufficient access rights on cross-reference id
Anything else particularly important?
#1 The app has been created using the Service Cloud Voice template, and that's the "edition" of Analytics the org has, if you would. It's part of Service Analytics feature licence that is thrown in with Service Cloud Voice.
#2 Individually, all components deploy ok, apart from Dataset and Dashboard
#3 If I deploy the Dataflow and run it, the Dataset created does not belong to the App I deployed, it belongs to a "Shared App" which is automatically created. If I try to change the App of the dataset to Some_Analytics_App, I get the error below, which is interesting because it matches the error I get on deployment.
#4 Related to the point above I have found this nicely written article , but I don't understand what the following means: "Attempting to save a dataset into any Templated App using Dataset Creator for which the user does not have access to the App" - even if someone can "translate" this for me like I am a golden retrieve, would work 😀
Your attention to this matter is greatly appreciated.
vio
‼Update‼
Old thread, but I did find the solution with the hellp of Salesforce technical support team. 🙂
So, steps to be able to deploy a templated app into a scratch org:
- Navigate to "Analytics Studio" app. If this is missing, make sure you assign yourself the permission sed "CRM Analytics Platform Admin".
- Click "Create App". Select "Create Blank App". Click Continue. Name it as per the app you are trying to deploy.
- Navigate to the app, click "Create" and select "Dataset". Select from CSV. Use a dummy-csv.csv file. Click "Next. Name the dataset exactly as per the name of the dataset in your templated app. Click "Next".
- Once process is finished you can now push entire force-app folder. This will overwrite the App you created with correct app from salesforce project folder.
SFDX command to push the force-app folder:
sf project deploy start -d force-app -c -g --verbose
Hope this helps everyone that subscribed to this thread!
Regards,
vio