function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BAU AdminBAU Admin 

MetaData API doesn't retrieve Activity Custom Fields

Hi Team,

We are facing an issue while retrieving Custom Fields through Retrieve methods of Sales force Metadata API. The issue is occcuring with Event and Task Standard Object (Basically Activity Object). Generated output files (e.g: Event.xml) is not retrieving any Custom fields from Event OR Task Object(e.g: •Color_vod__c
• Followup_Activity_Type_vod__c
• Mobile_ID_vod__c
• Override_Lock_vod__c
• TOT_ready_AZ_EU__c)

This is causing an serious issue for one of our development project for Metadata extraction and using the same information for other reporting tool purpose.
Any update or resolution on the same will be highly appreciated.

Barun Kumar Goswami
Cognizant Technology Solutions
logontokartiklogontokartik
Can you confirm if the profile that is used for Metadata API Retrieve has access to these Custom Fields? Thank you
BAU AdminBAU Admin
Hi,

We have verified the Field Level Security settings for the mentioned profile and all those fields which have been obstructed from retrieving are already visible for that profile(as shown below). We have also used the System Administrator profile for the same.

Any help to resolve the issue would be really great.

 Event FLS Settings for the API USer
logontokartiklogontokartik
When you say generated output files? what do you mean? Are you using Metadata API by consuming the WSDL and calling retrieve method? What application are you using to retrieve? (.NET or any other tool)
BAU AdminBAU Admin
Hi Karthik,

Thanks for your email and you are correct in your assumption.

We are using Retrieve method of Meta Data API and the generated output of Standard Event Object doesn't reveal the custom objects as shown above. Ideally all the custom fields of any Standrad or Custom Objects are exposed through Metadata API,but not in this scenario.

The result remains same, whatever method we do follow (Java or .NET language) to retrieve the Event related custom fields. Could you please elaborate the behaviour of the same.

Regards,
Barun Kumar Goswami
Cognizant Technology Solutions
Matthew Pantaleone 9Matthew Pantaleone 9
I had a similar problem with retrieving an Event Custom field using the ANT migration tool. I ended up having to use the Activity object in the package.xml instead of the Event object. 

So instead of Event.MyCustomField__c, the reference was actually Activity.MyCustomField__c.
Jayanth ThathapudiJayanth Thathapudi
Did anyone found the solution?

I am also facing the same issue when trying to pull the custom filed(XYZ__c ) in the "Activity custom field"

<types>
        <members>Activity.XYZ__c </members>
        <name>CustomField</name>
    </types>

when it tied to pull the above field using ANT then it is pulling Task.XYZ__C and Event.XYZ__C but not Activity.XYZ__c

Because of the above issue, my build is failing.

Any help would be highly appreciated