The trigger is firing, there are no errors, and it is running through all of the code, except the FOR loop w/ the SOQL query.
THE QUESTION Why is the trigger not jumping into the FOR loop?
THE TRIGGER
trigger LookupRollup on Child__c (after insert, after update, after delete, after undelete) {
// List of parent record ids to update
Set<Id> parentIds = new Set<Id>();
// In-memory copy of parent records
Map<Id, Opportunity> parentRecords = new Map<Id, Opportunity>();
// Gather the list of ID values to query on
for (Child__c c : Trigger.isDelete?Trigger.old:Trigger.new) {
parentIds.add(c.Opportunity__c);
}
// Avoid null ID values
parentIds.remove(null);
// Create in-memory copy of parents
for (Id parentId:parentIds) {
parentRecords.put(parentId, new Opportunity (Id = parentId, Child_Rollup__c = 0));
}
// Query all children for all parents, update Rollup Field value
for (Child__c c : [select id, Dollar__c, Opportunity__c
from Child__c
where id in :parentIds]) {
parentRecords.get(c.Opportunity__c).Child_Rollup__c += c.Dollar__c;
}
// Commit changes to the database
Database.update(parentRecords.values());
}