Print this page

Query returns 0 records after sandbox refresh

Knowledge Article Number 000199480
Description After a successful full copy sandbox refresh, query on some of the fields on an object are returning 0 records.
Resolution Here are few steps you can follow to understand the issue,
  1. Check if the same query returns any records in Production org.
  2. Check if the fields in the query have any custom indexes in production org? 

If an index is created on a field in production and the same data is copied from production to full copy sandbox, sometimes indexes are not copied over correctly and as a result no records are returned. If that's the case, re-indexing the fields in sandbox should resolve the issue. Please reach out to salesforce support to re-index the fields in sandbox. Make sure to provide the query to re-index the fields.


promote demote