You need to sign in to do that
Don't have an account?
Ivan Winzer
Too many SOQL queries: 101 on bulk load
Can anyone help with my trigger. Im trying to do a data load to the object but keep getting this error. I cant seem to see why my trigger is having the issue i thought i bulkified it..
trigger mainShipToAddessTrigger on ShipTo_Address__c (before insert, before update) { List<ShipTo_Address__c> slist = new List<ShipTo_Address__c>(); for ( ShipTo_Address__c s : trigger.new ) { if ( s.Primary_Billing_Address__c == true) { Contact c = New Contact(Id = s.Contact__c); system.debug('***** UPDATING:'+c.Id+' '+s.Address__c+' '+s.City__c); c.MailingStreet = s.Address__c; c.MailingCity = s.City__c; c.MailingState = s.State__c; c.MailingCountry = s.Country__c; c.MailingPostalCode = s.ZIP__c; update c; } if ( s.Default_Shipping_Address__c == true) { Contact c = New Contact(Id = s.Contact__c); system.debug('***** UPDATING:'+c.Id+' '+s.Address__c+' '+s.City__c); c.OtherStreet = s.Address__c; c.OtherCity = s.City__c; c.OtherState = s.State__c; c.OtherCountry = s.Country__c; c.OtherPostalCode = s.ZIP__c; update c; } } }
All Answers
statement. and just before line# 31,
But it still saying that my coverage on a few other triggers is low and im miss hiting some of the triggers or classes.
system.listexception: duplicate id in list: 003400000cWe1BAAS trigger.mainshiptoaddressTrigger: line 29, column 1
Seems it does not like my update statement....