2

I'm looking at the getUpdated() and getDeleted() calls in the SOAP and REST APIs, and I see that they are only supported by SObjects that are flagged as 'replicateable'. I haven't found any docs though about what this field really means. Is this flag just the Salesforce way of saying "These are the SObjects that you need for Data Replication, and you shouldn't need those that don't have this flag"? Or is this their way of saying "We haven't yet implemented the code to make these other SObjects support these calls"? In other words, do the SObjects with the replicateable flag represent the complete set of SObjects needed to do a reasonable job of data replication, or has Salesforce simply not implemented support for getUpdated() and getDeleted() on other essential SObjects?

Secondary question: When it comes to custom objects, how is this flag handled? Is it set to true by default, based off of a SystemModstamp field?

  • @superfell, Any input on what drives the replicateable field being true/false? You seem to have the most information (particularly of the inside variety) on other questions. – Daniel Ballinger Jun 28 '15 at 23:43
2

I agree that the documentation is a bit vague on what actually makes an sObject replicateable.

Certain objects cannot be replicated via the API. To replicate an object via the getUpdated() call, its object must be configured as replicateable (replicateable is true). To determine whether a given object can be replicated, your client application can invoke the describeSObjects() call on the object and inspect its replicateable property.

There isn't any guidance on how the replicateable property can be configured.


For empirical evidence, I iterated over all the DescribeSObjectResult's returned via the API and captured the name of anything where replicateable was false:

The resulting non-replicateable list was:

AcceptedEventRelation
AccountPartner
AccountShare
ActionLinkGroupTemplate
ActionLinkTemplate
ActivityHistory
AggregateResult
ApexLog
ApexTestQueueItem
ApexTestResult
AppMenuItem
AssignmentRule
AsyncApexJob
AttachedContentDocument
AuraDefinition
AuraDefinitionBundle
AuthConfig
AuthConfigProviders
AuthProvider
AuthSession
CampaignShare
CaseShare
CaseStatus
ChatterActivity
ClientBrowser
CollaborationGroup
CollaborationGroupMember
CollaborationGroupMemberRequest
CollaborationInvitation
CombinedAttachment
Community
ConnectedApplication
ContactShare
ContentDocument
ContentDocumentLink
ContentFolderLink
ContentFolderMember
ContentVersion
ContentWorkspace
ContentWorkspaceDoc
ContractStatus
CorsWhitelistEntry
CronJobDetail
CronTrigger
CustomObjectUserLicenseMetrics
CustomPermission
CustomPermissionDependency
Dashboard
DashboardComponent
DataType
DeclinedEventRelation
DocumentAttachmentMap
Domain
DomainSite
DuplicateRule
EmailDomainKey
EmailStatus
EntityDefinition
EntityParticle
EventLogFile
ExternalDataSource
ExternalDataUserAuth
FeedComment
FeedLike
FeedPollChoice
FeedPollVote
FeedTrackedChange
FieldDefinition
FieldPermissions
ForecastShare
GrantedByLicense
KnowledgeableUser
LeadShare
LeadStatus
ListView
ListViewChart
ListViewChartInstance
LoginGeo
LoginHistory
LoginIp
LookedUpFromActivity
MacroShare
MatchingRule
MatchingRuleItem
MobileDeviceRegistrar
Name
NamedCredential
NoteAndAttachment
OauthToken
ObjectPermissions
OpenActivity
OpportunityPartner
OpportunityShare
OpportunityStage
OwnedContentDocument
PackageLicense
PartnerRole
PermissionSet
PermissionSetAssignment
PermissionSetLicense
PermissionSetLicenseAssign
PlatformAction
ProcessDefinition
ProcessInstance
ProcessInstanceHistory
ProcessInstanceStep
ProcessInstanceWorkitem
ProcessNode
Publisher
PushTopic
RecentlyViewed
RelationshipDomain
RelationshipInfo
Report
SamlSsoConfig
SecureAgent
SecureAgentPlugin
SecureAgentPluginProperty
ServiceFieldDataType
SetupEntityAccess
Site
SolutionStatus
StreamingChannelShare
TaskPriority
TaskStatus
TenantUsageEntitlement
ThirdPartyAccountLink
Topic
TopicAssignment
UndecidedEventRelation
UserEntityAccess
UserLicense
UserListView
UserListViewCriterion
UserLogin
UserPackageLicense
UserPreference
UserProvisioningConfig
UserProvisioningRequestShare
UserRecordAccess
UserShare

Points of interest:

  • None of my numerous custom objects appeared (no __c suffix). I assume this means replication is available for all custom objects. However, this is a based on a sample size of 1, so your results may vary.
  • Many of these represent views and sharing access over other data. This is system level data. Things like CronTrigger and ApexLog. It wouldn't really make sense to provide this data for replication.
  • The Content* (e.g. ContentVersion) records appear and might be something you want to replicate. Content has always been a bit off the standard sObject implementation and more a law unto itself. The probably also explains why it isn't supported.
  • I did have some external custom objects with the __x suffix appear as non-replicateable (I excluded them from the list above). That makes sense as the data isn't actual in Salesforce.

Interesting response from @superfell in SOAP API - getUpdated()/retrieve() vs query()/queryMore(): (my emphasis)

Specifically for the getUpdated() case, you are correct that you can do a query/queryMore alternative by building the correct where clause. However the where clause differs by object type. You should use the SystemModstamp field where available, if it doesn't have that, then use LastModifiedDate and if it doesn't have that, use CreatedDate. This is basically what getUpdated() is doing under the covers.

So replicatable is relying on those three fields to provided the getUpdated() functionality.

The same answer also has:

But, it worth understanding that there is no SOQL equivalent for getDeleted(), many types of rows can be hard deleted and so a queryAll with isDeleted=true will not spot these deletes, but getDeleted() will (which keeps a separate delete log).

It is unclear what drives that separate delete log, but it is probably tied into the replicateable flag.

|improve this answer|||||
  • Thanks for the response. I wish Salesforce could weigh in on the intentions behind the flag, but your comments match up with what I've seen so far. – kensentor Jun 30 '15 at 17:35
  • @KRH. You could try politely nudging superfell on twitter. He seems to have all the inside knowledge on how it works internally. – Daniel Ballinger Jun 30 '15 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.