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
Ariel Berkman 5Ariel Berkman 5 

Replication API Calls inconsistent behavior in some sObjects

Hi,

The replication API calls (GetUpdated() and GetDeleted()) do not seem to behave consistently across all sObjects.

Specifically:

1) The 'Organization' sObject does not seem to get updates for changes in the 'MonthlyPageViewsUsed' column (maybe in other columns as well) despite this sobject being 'replicable' and this filed is not a 'calculated' field.

2) The 'OpportunityLineItem' sObject does not seem to  get updates for changes in the 'Name' column (this sObject is 'replicable' and this field is not a 'calculated' field)

As far as we can tell, this incosistency is only in these two sObjects (we are not running into any problems with any other sObject so far).

Do you have any idea what could be the cause of that? 

(While I can simply not replication these two sObject, we would like to understand the cause of this issue so that we properly handle these situations).

I'm using the REST API (v32), but believe this is also the case with (atleast) API v31.

Any insights would be highly appreciated.

Thanks,
Ariel.

 
ShashankShashank (Salesforce Developers) 
The fields that you mentioned are read-only fields, and have the attribute updateable='false'. That should be the reason why they are not replicateable.
Ariel Berkman 5Ariel Berkman 5
Hi Shashank,

Thanks for your reply.

Is this the case for all fields that are updatable=false and are read-only?

I'm only seeing any notes about replication in terms of readonly, updatedable=false fields, only note about calculated fields: http://www.salesforce.com/developer/docs/api/Content/field_types.htm in the documentation about field types.

Also, how come the Name field in the 'OpportunityLineItem' is ready-only? We are definitely seeing changes in this field (when issuing a SOQL query on this table at different times), without the SystemModstamp, or LastModifiedDate fields changing and without these changes, the getUpdated() isn't being triggered on these records (which results in the replication not reflecting the actual state of this sObject).

Thanks!
Ariel.
ShashankShashank (Salesforce Developers) 
The "Name" field under opportunitylineitem is a new read-only field which was included since API version 30.0 which is derived from the name of the product that is linked to the line item record. This is only available via the API, and can change if the linked product or the name of the linked product changes. It is similar to a calculated field in theory, and so is the 'MonthlyPageViewsUsed' on the Organization object.

Read-only is not a field type, but an attribute of a field. Calculated fields are always read-only.
Ariel Berkman 5Ariel Berkman 5
Thanks Shashank,

Is there a a way to identify all such fields via the API? or is there a document listing all these 'exceptional' fields?

Similarly to calculated fields, we would like to be aware of them so that we don't try to replicate them.

Thanks,
Ariel.
 
ShashankShashank (Salesforce Developers) 
I am unable to find documentation that I can share with you regarding this, but this should typically be the case with any field which cannot be modified directly via the API. The updateable='true' attribute is a good clue.
Ariel Berkman 5Ariel Berkman 5
Hi Shashank,

We did some further digging and found a few additional cases where fields get updated and the getUpdated() isn't "fired" (or in other words, the LastModifiedDate/SystemModstamp aren't changing when the field changes).  These fields don't seem to be 'readonly', so any insights would be appreciated as to whether this is expected behavior, and also if there's a way to easily identify these fields:

Users.LastLoginDate
QuoteLineItem.ListPrice
Profiles.PermissionsViewAllUsers
OpportunityTeamMember.OpportunityAccessLevel
OpportunityContactRole.IsPrimary
ApexPages.Markup

Furthermore, the EntitySubscriptions sObject doesn't seem to get updates (despite the documentation showing it supports getUpdated/GetDeleted).

Looking forward to hearing from you.

Thanks,
Ariel.