4

I have a custom Apex REST class that accepts a POST request and updates a custom object associated with the request. The inbound POST request contains an 'If-Unmodified-Since' header with the time it was sent (GMT.) Occasionally, the DML upsert operation will fail with the following error:

ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE

My question is: when the 'If-Unmodified-Since' header is included in a request to a custom Apex REST endpoint, will any DML operation fail on any record if the associated record's LastModifiedDate is after the 'If-Unmodified-Since' header date? Or is the comparison done against a different field? Is the logic different entirely?

Any information would be helpful. I can't find any documentation on this behavior.

  • 2
    I think it would be SystemModStamp, actually. But I don't see it in the documentation, either. – sfdcfox Feb 20 '18 at 18:29

Your Answer

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

Browse other questions tagged or ask your own question.