function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chiyaan AnanthChiyaan Ananth 

How to specify members in package.xml for dashboards

I am trying file based retrieval.  As wild card * option is not allowed for dashboard,  how should I mention the members to retrieve my dashboards?

I have tried using listMetadata() method to retrieve the full name of my dashboard.  And I have found the full name to be results/TrialDashboard.  But when I mention this in the package.xml,  I am not able to retrive my dashboards.

 

    <types>

     <members>results</members>

        <members>results/TrialDashboard</members>

        <name>Dashboard</name>

    </types>

didn't help too. 

Thanks in advance. 

Message Edited by Chiyaan Ananth on 03-05-2009 11:52 PM
Message Edited by Chiyaan Ananth on 03-06-2009 12:55 AM
Chiyaan AnanthChiyaan Ananth

Some how figured out the way to retrieve the dashboards.  I had a guage in my custom dashboard,  removed the chart and filled the dashboad with s-control components.  So now when trying to retrieve the dashboard it works flawlessly.

 

Thank you. 

Message Edited by Chiyaan Ananth on 03-06-2009 03:36 AM
Ken SKen S
The above is a workaround but not really an answer.

Another workaround is to use Workbench to locate the dashboard fullName, but this is manual of course (note I am trying to retrieve using VS Code in package.xml for one time push/pull as an admin just to tweak a dashboard, not from code as a developer). 

Also it seems at some point Salesforce changed the developer names for the dashboard itself only (but not path) from friendly names to hashed hexadecimal strings (maybe Classic dashboards show the name instead?), e.g.:  

Workbench - dashboards

Salesforce documentation for folders (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_folder.htm) and dashboards (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_dashboard.htm) is of little help, as it only gives an example with a text document and you can't use wildcards with dashboard folders.

So same question - how in package.xml do I retrieve ALL dashboards in that folder?

And what if I have hundreds of folders and dashboards to look through... How can I query using the friendly name(s) to get the hashed developer name(s) without manually locating each one?