2

We're using Conga Composer. We've added a custom field to the class "APXTConga4__Conga_Template__c" called "Template_Call_Method__c". It's a picklist.

When I deploy to a new org I have to be able to add this field to the APXTConga4__Conga_Template__c object, otherwise dependencies will fail, the most obvious being any permissions that rely on this field.

I already have CustomObjects defined in package.xml as this:

<types>
    <members>*</members>
    <name>CustomObject</name>
</types>

And I've tried adding the field to CustomFields:

<types>
    <members>*</members>
    <members>APXTConga4__Conga_Template__c.Template_Call_Method__c</members>
    .
    .
    .
    <name>CustomField</name>
</types>

However, when I try to deploy this I get the following error:

objects/APXTConga4__Conga_Template__c.object -- Error: Must specify a non-empty label for the CustomObject
[+ consequent errors]

Edit to add: If I try and add the whole Conga object to the package manifest as follows:

<types>
    <members>*</members>
    <members>APXTConga4__Conga_Template__c</members>
    <name>CustomObject</name>
</types>

Then I get this error:

objects/APXTConga4__Conga_Template__c.object -- Error: Cannot modify object: entity=CustomEntityDefinition, component=01I20000000tcgu, field=Description, state=MANAGED_INSTALLED: newValue='Merge template manager for use with Conga Composer and Conga Mail Merge.', oldValue='Template Manager for use with Conga Composer and Conga Mail Merge.'

Ie, as expected, its a managed package, you can't mess with it.

So how can I deploy the custom field to this object using ant?

4 Answers 4

5

If you are deploying a CustomField onto an object provided by another managed package, you cannot include the CustomObject in your package.xml and you need instead list the CustomField in the package.xml. If you change your package.xml to this it should work:

<types>
   <members>APXTConga4__Conga_Template__c.Template_Call_Method__c</members.
   <name>CustomField</name>
</types>

We do something similar in one of our packages which extends another managed package. You can see the object definition and the full package.xml file at the links below. The package.xml lists the CustomField but does not list the npo02__Household__c CustomObject.

https://github.com/SalesforceFoundation/Cumulus/blob/dev/src/objects/npo02__Household__c.object https://github.com/SalesforceFoundation/Cumulus/blob/dev/src/package.xml

Note that we use a very explicit package.xml with no wildcards so I'm not sure if your wildcard for CustomObject will include the APXTConga4__Conga_Template__c CustomObject or not. If you get the same error, you might have to explicitly list out your CustomObjects and exclude the Conga object from the members.

6
  • 1
    On second read of the original question, I noticed that you had tried not including the Conga object in CustomObject then later tried adding it to CustomObject. I think the last paragraph of my answer might be what's going on. I'd try listing the CustomField in package.xml and explicitly listing your CustomObjects in the package.xml file, no wildcard. Jul 7, 2014 at 20:00
  • To be clear, I did try adding it to CustomField. When I do this APXTConga4__Conga_Template__c is not included in CustomObject. The wildcard does not pull in this object (which makes sense).
    – powlo
    Jul 9, 2014 at 10:55
  • What makes you believe the custom object is not being included by the wildcard? The first error message in your post seems to indicate that it was trying to deploy the custom object and was rejected because you didn't provide a label for the custom object. Did you try the suggestion to remove the wildcard and explicitly list all custom objects in package.xml except the conga objects? Jul 9, 2014 at 15:17
  • Well yes, you're correct, a custom object is added, but it only includes the custom field specified in the package.xml manifest. I know the wild card does not add custom objects from managed packages because I would see many more objects (from APXT + others) in my retrieved folders.
    – powlo
    Jul 10, 2014 at 8:20
  • 1
    The behavior of a wildcard in retrieve and in deploy may be different though. When you deploy, I would presume wildcard means everything in the objects folder which in your case includes the conga object. However, I haven't tested that belief. The problem is if the deployment tries to deploy the custom object, your current object file will fail as it doesn't contain some of the required elements (i.e. label). I know for a fact that it's possible to deploy only the CustomField and not the CustomObject though, I'm just unsure about how the wildcard behaves on deploy. Jul 10, 2014 at 23:14
1

Having added the CustomField to the package.xml you must first do a retrieve (on the org you added the field to) to get all the information about the field pulled into a .object file. The deploy (to the new org) should then work.

0

Your error is the result of using wildcards (*), which will retrieve all custom objects, including those in packaged namespaces, i.e., apps - in Conga's case it's APXTConga4__. You cannot modify those object definitions for the most part and any attempt (when you deploy) will result in the error message. It is allowed to add new fields to those objects though, and the way to do it, as Jason described, is to explicitly use the custom field names.

I stay away from wildcard for the most part, mostly because its inability to filter out namespaces. There are certain situations that may call for it, but you really need to be sure that's what you want.

1
  • If this were true then I would see all packaged objects being retrieved. Eg, "Salesforce for Google AdWords", "Conga Query Manager", "apex-lang managed", This is not the case.
    – powlo
    Jul 11, 2014 at 14:52
0

This error is not because of wildcard. It looks like a Salesforce bug see below error and this i purely added only fields in package.xml

All Component Failures:

  1. objects/dsfs__DocuSign_Recipient_Status__c.object (dsfs__DocuSign_Recipient_Status__c.Submission__c) -- Error: Not in package.xml
  2. objects/dsfs__DocuSign_Status__c.object (dsfs__DocuSign_Status__c.Submission__c) -- Error: Not in package.xml

Submission__c is the custom field I am trying to push to other environments. Its works with Eclipse but gives error using ANT.

You must log in to answer this question.

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