4

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.

  • 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 Dec 2 '15 at 16:57
  • 2
    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 Jan 18 '16 at 21:20
  • Thanks joe! Could you post that as an answer and accept that as the solution? – Willem Mulder Sep 29 '17 at 13:18
  • @WillemMulder, I've done that now. – joe Oct 2 '17 at 9:39
  • Great; upvoted! – Willem Mulder Oct 2 '17 at 11:33
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.

  • 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 Dec 3 '15 at 21:45
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.