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
dai.odaharadai.odahara 

dashboard comp with metadata api 14.0

Hi, does anyone can retrieve dashboard component with meta data api 14.0? (prelease env)

When I tried it, salesforce retursn data bellow only against my will. (I wanted to get dashboard component..).
Does someone know why this is happening..?

****************** response soap from salesforce **************
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns="http://soap.sforce.com/2006/04/metadata">
    <soapenv:Body>
        <listMetadataResponse>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/AdoptionDashboard
                </fullName>
                <id>01Zt0000000DqdsEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
            <result>
                <createdById>005t0000000tVaNAAU</createdById>
                <createdByName>Dai Odahara</createdByName>
                <createdDate>2008-09-11T08:52:35.000Z</createdDate>
                <fileName>
                    dashboards/dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard.dashboard
                </fileName>
                <fullName>
                    dashboards/CompanyDashboards.CompanyPerformanceDashboard/CompanyPerformanceDashboard
                </fullName>
                <id>01Zt0000000DqdtEAC</id>
                <lastModifiedById>005t0000000tVaNAAU</lastModifiedById>
                <lastModifiedByName>Dai Odahara</lastModifiedByName>
                <lastModifiedDate>
                    2008-09-11T08:52:35.000Z
                </lastModifiedDate>
                <type>Dashboard</type>
            </result>
        </listMetadataResponse>
    </soapenv:Body>
</soapenv:Envelope>
JonPJonP
The Metadata API's new listMetadata() method returns a list of the metadata components of a certain type in your Salesforce organization, for example Dashboards.  It does not return the actual content of the metadata components, only the "meta-metadata", such as fullname and the filename.

To download the actual definition of a metadata component, use the fullname value returned by listMetadata() in conjunction with the Metadata API's retrieve() method.  For details see the Metadata API Developer's Guide.
dai.odaharadai.odahara
thanks, jonP. I understand a means to user listmatadata but could not catch up well.
Speaking of downloading the actual definition of a metadata component by retrieve, I'm not sure that retrieve method returns actual component because its result type does not have dashborad, document, etc component wsdl difinition.

Using full name value ought to "specificFiles" of RetrieveResult?

Thank you very much
JonPJonP
The retrieve() method returns a zip file containing the set of metadata components you have requested.  It does NOT return individual components as inline XML.
dai.odaharadai.odahara
Thank you very much, jonP. I understand how to work on it,...but now I'm facing a problem upon unabling to decode value of <zipFile> while tyring to decode the value with base64... The result of decoding goes to ghoast characters even if I use utf8...