0
votes

I am inserting some 350 person account records through apex data loader.I have a trigger on account which uses logged in user details. While inserting the records i m getting this error

"LeadAssignment: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject Trigger.LeadAssignment: line 20, column 1"

Can anyone tell me how to get logged in user details while using apex data loader?

Thank You.

1

1 Answers

0
votes

It would be worth looking at https://developer.salesforce.com/forums/ForumsMain?id=906F00000008yJvIAI which deals with a similar situation, albeit some time ago, to see if the problem is called by NULL values.

If so, I would suggest using the check for NULL approach they originally tried in the trigger, and only adding the Try-Catch workaround if that is still required.