Thursday, August 6, 2009

Salesforce APEX "System.QueryException: List has no rows for assignment to SObject"

The assignment to a single object requires the query to return a single row, if the query may not return a row, you should assign it to an array, then examine the size of the array to determine if you got a row or not, and take the appropriate action.
http://forums.sforce.com/sforce/board/message?board.id=apex&thread.id=3470