+ Start a Discussion

Unable to cover below Query in Test class code coverage.Cany anyone ?

Select Account.Owner.Id,Type__c,Id,Name,Account.Id,Account.Name,Owner.Id from Opportunity where Id<>null  
Deepali KulshresthaDeepali Kulshrestha
Hi PM,

Try the below code:-

List<Opportunity> opplist=[Select Account.Owner.Id,Id,Name,Account.Id,Account.Name,Owner.Id,Type from Opportunity WHERE id<>null];

I hope you find the above solution helpful.If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha