According to SF's page on System Fields, SystemModstamp gets updated 'Date and time when this record was last modified by a user or by an automated process (such as a trigger). '.

Does anyone have a definitive list of 'or by an automated process'?

Reason I ask is because I have an SSIS package connecting to SalesForce.com where each Data Source has ... 'WHERE SystemModstamp > <@User::dt_last_success>', and I'm observing that I'm getting way more rows that are reflected in a day's data entry activity. I haven't proved this yet by doing a compare of rows across days, but that might be coming.

Thanks in advance. Jim


I do not have a list BUT:

Think of anything that happens by the system AFTER a user clicks save:

  1. Triggers
  2. Workflow field updates
  3. Rollup summaries causing triggers to fire
  4. and possibly many other things.

So potentially the mod time can be > the success time if it happens slowly enough in SF to be > than the timestamp in the remote system.

| improve this answer | |
  • Ok. So then the question becomes .. 'Will the SystemModstamp value ever change if there is not a change in any other columns? The reason I ask is because in my current design I'm using the combination id and SystemModstamp as the primary key, assuming that if any data changes it will result in a new SystemModstamp value. However, I need to know if I'm running the risk of duplicate rows where two rows have all the same values except for the SystemModstamp. – Jim Horn Dec 5 '14 at 21:07
  • @JimHorn - If you are using the ID with something else, how could you have duplicates as the ID is unique???? You could potentially have rows that do not match but the SF ID exists due to data skew. It all depends on your process flow – Eric Dec 5 '14 at 22:04
  • What I'm trying to do is capture every change on my end. Since the SF rows are unique (that's a Type 1 SCD) on my end I'm trying to interpret if the row changed by comparing id and SystemModstamp to what I currently have in SQL Server. If SystemModstamp changed for a given id then there was a change, which I'm storing in SQL as a Type 2 SCD with a start_dt (SystemModstamp,) and end_dt (one second before next row's start_dt, or NULL if current row). – Jim Horn Dec 8 '14 at 14:29
  • My assumption in doing the above, which is the heart of my question, is that if SystemModstamp changed can I assume that at least one value changed, and conversely if SystemModstamp did not change can I assume that the entire row has not changed? – Jim Horn Dec 8 '14 at 14:30
  • @JimHorn - No you cannot. I can click edit, then save, both values will change but no fields were actually changed – Eric Dec 8 '14 at 23:11

Additional processes could also include:

  • case assignment
  • lead assignment
  • auto-response
  • case escalation
  • approval process

This help article here explains when the 2 dates are different:

LastModifiedDate is the date and time when a record was last modified by a user, and SystemModstamp is the date and time when a record was last modified by a user or by an automated process (such as a trigger).

As a result, LastModifiedDate and SystemModstamp will differ when automated processes update the records, which will happen in the following scenarios:

a) The archive date is extended to greater than 365 days.

b) An existing picklist value is updated.

c) A contact's e-mail address is flagged as per the Email Bounce Management configuration.

d) The LastActivityDate field is modified

Additional comparison with performance tips can be found here:

What is the difference between LastModifiedDate and SystemModStamp?

Let’s recap what LastModifiedDate and SystemModStamp dates are. They are both system fields that store date and time values for each record.

LastModifiedDate is automatically updated whenever a user creates or updates the record. LastModifiedDate can be updated to any back-dated value if your business requires preserving original timestamps when migrating data into Salesforce.

SystemModStamp is strictly read-only. Not only is it updated when a user updates the record, but also when automated system processes (such as triggers and workflows actions) update the record. Because of this behavior, it creates a difference in stored value where ‘LastModifiedDate <= SystemModStamp’ but never ‘LastModifiedDate > SystemModStamp’.

| improve this answer | |

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.