What does it mean
This Salesforce error occurs when a SOQL query attempts to retrieve more than 500 junction IDs in a single request. Salesforce enforces a hard API limit of 500 junction IDs per query, and once this limit is exceeded, the query fails.
This limitation applies to any Salesforce object that has many related records via junction (many-to-many) relationships. It is a Salesforce API restriction, not a Skyvia issue.
Objects commonly affected
- Event (most common case)
- Task
- Campaign
- Opportunity
- Case
- Custom objects with junction relationships
Objects with a large number of related records (Contacts, Leads, Accounts, etc.) are especially prone to this error during full or large-scale replications.
How to avoid the error
1. Narrow the query using Filter Settings. Limit the data volume per run by using filters such as: CreatedDate, LastModifiedDate, OwnerId, object-specific fields etc. Smaller data slices result in fewer junction IDs expanded per query. 2. Split the replication into smaller batches. Replicating in date ranges is the most effective way to stay under the 500-Id limit.
3. Temporarily exclude non-essential related (junction) objects - If certain related objects are not required, temporarily exclude them from replication to reduce junction ID expansion.
4. Query only necessary fields - avoid selecting all fields or unnecessary lookup/relationship columns, as they can trigger additional junction ID expansion.
Please check these links to know more: