8

I created a new sandbox and tried to deploy some code changes using Github and CircleCI (CircleCI internally uses Ant Migration Tool).

I get this strange error :

 [sfdeploy] Component Failures:
 [sfdeploy] 1.  tabs/Allocation.tab -- Error: Value too long for field: Icon maximum length is:15
 [sfdeploy] 2.  tabs/AllocationGroup__c.tab -- Error: Value too long for field: Icon maximum length is:15
 [sfdeploy] 3.  tabs/RejectionValue__c.tab -- Error: Value too long for field: Icon maximum length is:15

These tabs are unchanged from production and the deployment works fine on the other sandboxes. Other tabs without custom icons do not fail during the deployment.

Here is what is in the Allocation.tab file. This is same as in production.

<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
    <icon>SharedDocuments/AllocationLogo.png</icon>
    <label>Allocation</label>
    <mobileReady>false</mobileReady>
    <motif>Custom219: TV Widescreen</motif>
    <page>AllocationWeightingPage</page>
</CustomTab>

I'm unable to find any reference to this error message on Stackoverflow, Salesforce or Google.

Any help is much appreciated.

5
  • Additional info: If I try to deploy these tabs to an old sandbox using a change set, it succeeds If I try the same on the new sandbox, it fails.
    – joe
    Commented Dec 2, 2015 at 16:57
  • 4
    Resolved: I've identified the problem. The error message is misleading. It is because the image file with the exact name and extension was not present in Shared Documents. Once I uploaded the file to shared documents, the deployment went through fine.
    – joe
    Commented Jan 18, 2016 at 21:20
  • Thanks joe! Could you post that as an answer and accept that as the solution? Commented Sep 29, 2017 at 13:18
  • @WillemMulder, I've done that now.
    – joe
    Commented Oct 2, 2017 at 9:39
  • Great; upvoted! Commented Oct 2, 2017 at 11:33

2 Answers 2

6

The error message is misleading.

The error was because the image file AllocationLogo.png was not present in Shared Documents.

Once I uploaded the file to shared documents, the deployment went through fine.

2

This is just a standard Metadata API deployment error so nothing specific to CircleCI or even really the Force.com Ant Migration Tool.

The documentation for CustomTab shows that the icon field is a reference to a document by ID which makes sense given the error that the field limit is 15: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_tab.htm

To get the deploy to work, I think you'd have to know the document id of the icon which will be org specific.

1
  • thank you for your answer. I'll try using the document id. My confusion is that the deployment to production and older sandboxes don't fail while deployment to newly refreshed sandbox fails.
    – joe
    Commented Dec 3, 2015 at 21:45

You must log in to answer this question.

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