You need to sign in to do that
Don't have an account?
Francisco Garcia 34
How to query the Accounts with no Cases?
Hey guys,
I am looking to query the accounts that do not have any case. I have managed to query the accounts with cases in the first query statement of the code:
How could I use that result to find out the Accounts with no cases? I dont think it is necessary to provide the visualforce page.
Thanks
I am looking to query the accounts that do not have any case. I have managed to query the accounts with cases in the first query statement of the code:
public class controllerClass { Public Case myCase {get; set;} public List<Case> cases {get; set;} public List<Account> accounts {get; set;} Public controllerClass(ApexPages.StandardController stdController){ this.myCase = (Case)stdController.getRecord(); //Query Obtains the Accounts with cases and displays them as a table in firstProject.vfp this.cases = [SELECT AccountId, Status, Subject FROM Case ORDER BY AccountId DESC]; //This line is supposed to obtain the Accounts with no cases this.accounts = [Select Name FROM Account]; } }
How could I use that result to find out the Accounts with no cases? I dont think it is necessary to provide the visualforce page.
Thanks
This will return accounts with no cases.
All Answers
This will return accounts with no cases.