9

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

6

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:

 <types>
    <members>Activity.Intervention_Task_Number__c</members>
    <members>Task.Subject</members>
    <name>CustomField</name>
</types>

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).

0

Or you just add the entire Activity object at once

<types>
    <members>Activity</members>
    <name>CustomObject</name>
</types>

You must log in to answer this question.

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