• Michael Ries 10
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I've run into situations several times now where the getDeleted() API is returning an earliestDateAvailable that indicates it should have a record, but does not actually return the Id of a record that has been deleted.

I've observed this now at 3 different customers and on both Event objects as well as OpportunitySplit objects. These customers seem to have some kinds of automation set up on those objects which may be contributing to what I'm seeing?

The Reproducible
1) On 2020-01-03 11:00:20 UTC we issued a Salesforce SQL query for OpportunitySplit objects with LastModified >= 2020-01-02 10:00:00 UTC and we got back a record with the Id 0493b000003OI01AAG.

2) The OpportunitySplit had both CreatedDate and LastModifiedDate set to 2020-01-02T16:48:13.000+0000

3) If I query the API today specifically for 0493b000003OI01AAG it is no loner present in their Salesforce instance (also if I use a queryAll).

4) When I query the getDeleted API for OpportunitySplit objects between 2019-12-28 17:10:32 UTC and 2020-01-07 17:10:44 UTC I get back 42 records and the response shows earliestDateAvailable 2019-12-03T00:30:00.000+0000, but the response does not contain the Id of the OpportunitySplit in question (0493b000003OI01AAG)

Are there cases where an object is hard-deleted, but are not recorded in the delete log?

Is there a way for me to efficiently query for deleted objects that will include these hard deletes?
I have some code that syncs data and I make use of the Get Deleted (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_getdeleted.htm) API to make sure that I can remove records from my system that have been deleted in Salesforce.

I came across an OpportunitySplit recently that looks like this (leaving out some unimportant fields):
{"Id"=>"0491P000001BAWTQA4", "IsDeleted"=>false, "CreatedDate"=>"2019-06-06T19:35:00.000+0000", "SystemModstamp"=>"2019-06-06T19:35:00.000+0000"}
This item has been deleted in Salesforce and if I try to query for the item, I get no results.
 
SELECT Id, Split, IsDeleted FROM OpportunitySplit WHERE Id = '0491P000001BAWTQA4'

But when I request the list of deleted OpportunitySplits between 2019-06-06T18:35:00.000+0000 (one hour before it was created) and 2019-06-11T18:05:33.000+0000 (the current time when I was testing), I get back 118 entries, but not the Id of the object shown above. Is it possible that objects deleted in salesforce don't show up in the deleted list? Is there a better way for me to sync deletes into my system?

 
I've run into situations several times now where the getDeleted() API is returning an earliestDateAvailable that indicates it should have a record, but does not actually return the Id of a record that has been deleted.

I've observed this now at 3 different customers and on both Event objects as well as OpportunitySplit objects. These customers seem to have some kinds of automation set up on those objects which may be contributing to what I'm seeing?

The Reproducible
1) On 2020-01-03 11:00:20 UTC we issued a Salesforce SQL query for OpportunitySplit objects with LastModified >= 2020-01-02 10:00:00 UTC and we got back a record with the Id 0493b000003OI01AAG.

2) The OpportunitySplit had both CreatedDate and LastModifiedDate set to 2020-01-02T16:48:13.000+0000

3) If I query the API today specifically for 0493b000003OI01AAG it is no loner present in their Salesforce instance (also if I use a queryAll).

4) When I query the getDeleted API for OpportunitySplit objects between 2019-12-28 17:10:32 UTC and 2020-01-07 17:10:44 UTC I get back 42 records and the response shows earliestDateAvailable 2019-12-03T00:30:00.000+0000, but the response does not contain the Id of the OpportunitySplit in question (0493b000003OI01AAG)

Are there cases where an object is hard-deleted, but are not recorded in the delete log?

Is there a way for me to efficiently query for deleted objects that will include these hard deletes?
I have some code that syncs data and I make use of the Get Deleted (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_getdeleted.htm) API to make sure that I can remove records from my system that have been deleted in Salesforce.

I came across an OpportunitySplit recently that looks like this (leaving out some unimportant fields):
{"Id"=>"0491P000001BAWTQA4", "IsDeleted"=>false, "CreatedDate"=>"2019-06-06T19:35:00.000+0000", "SystemModstamp"=>"2019-06-06T19:35:00.000+0000"}
This item has been deleted in Salesforce and if I try to query for the item, I get no results.
 
SELECT Id, Split, IsDeleted FROM OpportunitySplit WHERE Id = '0491P000001BAWTQA4'

But when I request the list of deleted OpportunitySplits between 2019-06-06T18:35:00.000+0000 (one hour before it was created) and 2019-06-11T18:05:33.000+0000 (the current time when I was testing), I get back 118 entries, but not the Id of the object shown above. Is it possible that objects deleted in salesforce don't show up in the deleted list? Is there a better way for me to sync deletes into my system?