1

I am deploying with sfdx a custom app that has a reference to a Content Asset (Logo) - even though the Logo is in the same package I keep getting the following error: The image asset used for Logo isn't shared with the organization.

I've tried to separately load the logo into the org (Successfully) and then load the custom app - and I still get the same issue (even though the logo is referring to a correct Asset)

Here is the Custom App meta-data section:

<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
    <brand>
        <headerColor>#FC8500</headerColor>
        <logo>customers</logo>
        <logoVersion>1</logoVersion>
        <shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
    </brand>
...

And here is the Asset in the target org enter image description here

Has anyone seen this error before? I can't seem to find any reference for it (or how to get around it).

2 Answers 2

2

I managed to resolve this error by adding an relationships element the ContentAsset Metadata:

diff:

    @@ -3,6 +3,11 @@
     <isVisibleByExternalUsers>false</isVisibleByExternalUsers>
     <language>en_US</language>
     <masterLabel>customers</masterLabel>
+    <relationships>
+        <organization>
+            <access>VIEWER</access>
+        </organization>
+    </relationships>
     <versions>
         <version>
             <number>1</number>

full file:

    <?xml version="1.0" encoding="UTF-8"?>
    <ContentAsset xmlns="http://soap.sforce.com/2006/04/metadata">
        <isVisibleByExternalUsers>false</isVisibleByExternalUsers>
        <language>en_US</language>
        <masterLabel>customers</masterLabel>
        <relationships>
            <organization>
                <access>VIEWER</access>
            </organization>
        </relationships>
        <versions>
            <version>
                <number>1</number>
                <pathOnClient>customers.png</pathOnClient>
            </version>
        </versions>
    </ContentAsset>
1
  • Thanks - I came to the same conclusion and this definitely worked. Although why the asset didn't have viewer access rights for the entire org to begin with is another matter! Commented Dec 19, 2019 at 16:27
1

Please follow the steps below :

  1. Click the Gear icon on the upper right corner then select Setup
  2. Search for Salesforce Files in the quick find box
  3. Click on General Settings
  4. Enable/Check the 'Skip triggers execution and validation rules on asset files'
  5. Then try to install the package again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .