Is it possible to figure out if activities enabled for particular object via REST?
2 Answers
As per my knowledge, there is no direct way to get this information by Rest API.
But when Allow Activities
option is enabled for a custom object, following gets added to SObject describe:
LastActivityDate
field on object.ActivityHistory
andOpenActivity
on child relationship.
You could use these to know if the feature is enabled.
Describe SObject URL:
/services/data/v41.0/sobjects/{Object API Name}/describe
That information is not exposed in Rest API or Partner API. You need to use Metadata Soap API to read metadata for that object.
In Metadata API this is exposed as field CustomObject.enableActivities
field. See CustomObject reference for more info.
-
Nice. I was also looking at metadata API first but didn't find it. Thanks for sharing!– RaulCommented Apr 11, 2018 at 20:31