+ Start a Discussion
Duc Ha 4Duc Ha 4 

Workbench SOQL strange behavior

I use Workbench to run some SOQL queries to get data from my ContentDocument table. My first query simply lists all the records: 
"Select Id, Title from ContentDocument"
The number of records matchs what's returned by the SOQL API. However, if I select to include "Deleted and Archived Records" from the console, I see a couple more data. I am new to SFDC so this is a bit strange for me. But that wasn't the strangest part - the strangest part is by accident I ran into some DocumentIDs that were NOT included in the table, but if I search for them specifically, Workbench returns them! 

"Select Id, Title from ContentDocument where Id=<foo>"

I double-checked several times, using Title and ID so it's not my eyes. Plus there are more than 1 records missing.

So I have 2 questions: 
1> What do I need in my SOQL query to get everything from the table? I will only use API for production 
2> Why do I not see some records with a statement that should return everything ( I come from vanilly SQL camp)?