You need to sign in to do that
Don't have an account?
Varun Annadata
how to assigin a list to case?
I have created a data case and i am calling that method in my test class.but the problem is i have created a list in my data class and i am assigning list to case object in my test class.So it is giving me illegal assignment from list to case error.how to solve this?
Ex:
List<Case> CaseList ;
Case singleCase = CaseList[0];
If it is not clear, paste your code here, will give exact sintax to ur issue.
Thanks,
Nagendra Prasad.
If you have list you can try like below
For( Case caseObj : caseList)
{
add logic here
}
If only one record then like below
if(caseList.size() > 0 )
{
Case caseObj = caseList[0]
}