I'm not able to retrieve any custom fields on the Task object. I'm able to get Contact custom fields fine. These fields are included in a managed package, but I don't understand why the Contact fields are coming over fine, but not the Task fields. Below is the task object and field reference in the build file.

Task CustomObject

Task.Intervention_Task_Number__c CustomField

After trying to manually add the fields to the build file, I recieve an error "Entity Enumeration Or ID: bad value for restricted picklist field: Task

Any ideas? Thanks

2 Answers 2


In the Setup UI you will see that custom fields (that are presented for Task) are added under the "Activities" heading and this is also reflected in the package.xml that the Ant tools use.

So your package.xml will need entries like these:


where Activity is used for your custom fields and Task is used for standard fields such as Subject (whose picklist values you might want to customise).


Or you just add the entire Activity object at once


You must log in to answer this question.

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