When I run this script successfully, I do not get my system.debug lines showing up in the console log. But I do get them if I remove the DML Update statement. Is there a good reference guide, that shows how the logs determine what gets logged?
list<Opportunity> opps = [SELECT id, Channel__c, Name, (SELECT id, role, isPrimary FROM Partners) FROM Opportunity Where Channel__c = '' AND isClosed = false];
system.debug(opps);
for(Opportunity o : opps){
System.Debug('ZZZ : '+o.Name);
if(o.Partners.isEmpty()) {
o.Channel__c = 'Direct';
System.Debug(' ZZZ Size : '+o.Partners.Size());
} else {
o.Channel__c = 'Partner';
System.Debug(' ZZZ Size : '+o.Partners.Size());
}
for(Partner p : o.Partners){
System.Debug(' ZZZ : '+p.role);
}
}
update opps;
MAXIMUM DEBUG LOG SIZE REACHED
message?