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
Michael Ries 10Michael Ries 10 

"Get Deleted" response is missing deleted records

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?

 
Michael Ries 10Michael Ries 10
I also saw the note on the Get Deleted API docs that mentions how it prunes old values out of the delete log if there are too many, but the list of deleted items I get back includes deletes from before this object was created, so I don't think this would have been the oldest delete in the list
Michael Ries 10Michael Ries 10
Is this potentially related to the recent incident that saw some metadata permissions errors? https://help.salesforce.com/articleView?id=000320234&type=1&mode=1

Maybe metadata around deletes was lost?