Search This Blog

Thursday 19 July 2012

Solution: List has no row assignment issue


We assumed set SOQL query returned values assign to object's instance. If SOQL query returned null values means the "List has no row assignment" causes arising. we can solved by object's list instance.

Method1: Account acc = [Select Name from Account];

Method2: List<Account> listacc = [Select Name from Account];

If query returned null value means Method1 raises the respective cause, but Method2 is doesn't raise any causes and 'listacc' have 0 values. So we can controlled by listacc.size( ) method.

No comments: