Why no records inserted?
Question
I am attempting to insert new records into a system. There are 46 records available in the source, but the process inserts 0 records, and I cannot determine the reason. Here is my configuration:
{
"operation": "Insert",
"externalId": "Name",
"query": "SELECT Id, Name FROM Commitment__c where Deal__r.Name LIKE 'MigVax%'"
}
What could be the issue?
Answer
The issue is usually caused by a query that does not contain fields that can actually be written for the selected operation.
For Insert, include at least one creatable field (not only Id or non-writable fields).
If the object Name is auto-number/read-only, it cannot be used as an insertable value.
Use a query that includes fields you expect to insert (for example, custom/business fields), then rerun the job.