function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CLKCLK 

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

When i quering Account a = [Select name from acoount where id =: strId];

it throws exception System.QueryException: List has no rows for assignment to SObject

Best Answer chosen by Admin (Salesforce Developers) 
CLKCLK

i got it by making following correction.

List<Account> lst = [Select name from acoount where id =: strId];

All Answers

CLKCLK

i got it by making following correction.

List<Account> lst = [Select name from acoount where id =: strId];

This was selected as the best answer
girlycodergirlycoder

Thanks for the answer

Thanks .Thanks .

Thanks