Deploying Event & Task Fields

When creating a field for Event and Task objects, you have to create it by creating it through the Activity object. This in turn will show the field on the Activity object but if you take a look at the Event and Task objects, you will not see the custom field that you created via the Activity object. 

When attempting to commit, you will see the custom field for the Event and Task field in the metadata grid, however, these should not be selected if you are attempting to deploy the new field or any changes made directly to the field. If you attempt to commit the Event or Task custom field and deploy, you will receive errors like the ones below:

[Event.fieldname_c] An object [Event.fieldname_c] of type CustomField was named in package.xml, but was not found in zipped directory
[Task.fieldname_c] An object [Task.fieldname_c] of type CustomField was named in package.xml, but was not found in zipped directory
 
This error occurs when trying to deploy the custom field from the Event and Task object because although they appear in the metadata grid, if you go to the Event and Task object in the source org, you will not see the actual custom field on those objects. 

So, in order to deploy changes to the field or add the field from the Event and Task object, you must select the Activity.fieldname_c in the metadata grid when committing. This in turn will commit the Activity field as well as the Event and Task field.

The reason the Task and Event custom field appears in the metadata grid when committing is strictly to commit Field Level Security changes for those fields. For instructions on how to do this, please see the below article:

https://docs.copado.com/article/xkg7llo0ro-how-to-deploy-fls-for-activity-fields

How did we do?