The Salesforce API returns error messages when it can’t deploy metadata. Learn more about the error, what the cause is and how you can fix the problem.

If you see this Salesforce error message:

  • In field: logo - no Document named SharedDocuments/My_Logo.png found

Try this quick fix:

  1. Make sure that that file is included in your package.xml.
<types>
    <members>SharedDocuments/My_Logo.png</members>
    <name>Document</name>
</types>

This error is caused by an incomplete package.xml file.

You are seeing this error because the Ant script or Metadata API is trying to deploy a content asset that it cannot find. It’s looking for the document but cannot find it.

To deploy assets like a logo via the Metadata API you first need to ensure that the API knows where to find your asset. In order to deploy automatically via an API or script you need to ensure that these kinds of binary assets are tracked in your version control system. Tracking these assets can be a bit difficult with Git and Salesforce. But adding it to the package.xml should help your next build to pass.

Other Solutions

Use an automated deployment tool

A deployment tool like Blue Canvas can automatically track your metadata and binary assets as they are created. If you add metadata to a sandbox, we automatically pick it up and commit it into Git source control. We also update the package.xml with the correct information. This is true for binary assets like this one as well as other metadata types like Custom Objects.


Blue Canvas can automate your deployments

Our app can automatically handle issues like this one. We’ve built a custom deployment engine that talks directly to Salesforce APIs and knows special workarounds for errors like this one and many others. We want your Salesforce deployments to be quick and simple so you can deploy in seconds instead of hours.

Try our automated deployments →