You need to sign in to do that
Don't have an account?

MD
hey guys..I have a before insert trigger on a OrderLineItem__c object which is the detail object. The master is Order__c. When it fires it should populate the sales_rep__c with the ownerid associated to the order.contact__c field. This works with 1 record but when i do a bulk insert with data loader I get this issue. if anyone can help i would really appreciate and mark as solution
OrderLineItemsTrigger: execution of BeforeInsert caused by: System.ListException: List index out of bounds: 1 Class.MyUtilities.SalesRepAssign: line 11, column 1 Trigger.OrderLineItemsrigger: line 11, column 1
Hi,
Can you please check the list size before iterating in the for loop.
Regards,
Sridhar Bonagiri