3 respuestas
Hi Joshua,Mark as best answer, If it resloves !! Their error will occur when query does not return rows. I have given sample code below to understand
Account a = [select id, name from Account where name = 'test'];
Instead of using this we should use like that
List < Account > lstAccount = [select id, name from Account where name = 'test'];
if(lstAccount.size() > 0) {
Account a = lstAccount.get(0);
}
If need more information on your code please post your code here to debug us more.
Mark as resloved if it helps :) :)Thanks,
Bhanu Prakash
visit ForceLearn.com