Salesforce ObjectsToGet Configuration File Example for CRM Content
When your Salesforce organization contains CRM Content and you want to index the content of these files, you must include additional queries to your custom ObjectsToGet configuration file.
The following XML code is an ObjectsToGet configuration file example for Chatter files.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Query>
<ObjectName>ContentVersion</ObjectName>
<Fields>
<string>CreatedDate</string>
<string>LastModifiedDate</string>
<string>SystemModstamp</string>
<string>IsDeleted</string>
<string>Id</string>
<string>ContentDocumentId</string>
<string>ContentModifiedById</string>
<string>ContentModifiedDate</string>
<string>ContentSize</string>
<string>ContentUrl</string>
<string>Description</string>
<string>FeaturedContentBoost</string>
<string>FeaturedContentDate</string>
<string>FileType</string>
<string>FirstPublishLocationId</string>
<string>IsLatest</string>
<string>NegativeRatingCount</string>
<string>Origin</string>
<string>OwnerId</string>
<string>PathOnClient</string>
<string>PositiveRatingCount</string>
<string>PublishStatus</string>
<string>RatingCount</string>
<string>ReasonForChange</string>
<string>TagCsv</string>
<string>Title</string>
<string>VersionData</string>
<string>VersionNumber</string>
</Fields>
</Query>
</ArrayOfQuery>
The following XML code is an ObjectsToGet configuration file example for CRM Content.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Query>
<ObjectName>ContentVersion</ObjectName>
<Fields>
<string>Id</string>
<string>IsLatest</string>
<string>ContentUrl</string>
<string>Title</string>
<string>IsDeleted</string>
<string>ContentModifiedDate</string>
<string>CreatedDate</string>
<string>LastModifiedDate</string>
<string>SystemModstamp</string>
<string>PublishStatus</string>
<string>VersionData</string>
<string>ContentSize</string>
<string>Origin</string>
</Fields>
<ParentRelationships>
<ParentRelationship>
<RelationshipName>ContentDocument</RelationshipName>
<Fields>
<string>Title</string>
</Fields>
</ParentRelationship>
<ParentRelationship>
<RelationshipName>Owner</RelationshipName>
<Fields>
<string>Name</string>
</Fields>
</ParentRelationship>
<ParentRelationship>
<RelationshipName>CreatedBy</RelationshipName>
<Fields>
<string>Name</string>
</Fields>
</ParentRelationship>
<ParentRelationship>
<RelationshipName>LastModifiedBy</RelationshipName>
<Fields>
<string>Name</string>
</Fields>
</ParentRelationship>
<ParentRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<Fields>
<string>Name</string>
<string>Type</string>
</Fields>
</ParentRelationship>
</ParentRelationships>
<PolymorphicRelationships>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Account</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Asset</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Campaign</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Case</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>CollaborationGroup</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Contact</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>ContentWorkspace</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Contract</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Dashboard</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>DashboardComponent</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Event</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Lead</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Lost_Scroll__ka</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Magic_Item__c</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Magic_Spell__ka</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Opportunity</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Product2</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Report</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Site</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Solution</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>Task</ObjectName>
</PolymorphicRelationship>
<PolymorphicRelationship>
<RelationshipName>FirstPublishLocation</RelationshipName>
<ObjectName>User</ObjectName>
</PolymorphicRelationship>
</PolymorphicRelationships>
</Query>
</ArrayOfQuery>
What's Next?
Create a mapping file for fields from obtained objects (see Salesforce Mapping File Example for CRM Content).