You need to sign in to do that
Don't have an account?
Violet
Getting a List of Accounts with Closed Won opportunities
Trying to create a Trigger handler for a Trigger on Account to find List of Accounts that have opportunities with stage 'Closed Won', but not sure if I have the SOQL query set up right. Any help would be appreciated. Getting error ' unexpected token: 'SELECT''
public class NoAccDelwithClosedWonOpenOpps { public static Boolean checkAcc_OppClosedWon_Open(List<Account> listaccts){ Boolean cantdelete; List<Account> listofaccts=[SELECT Id (SELECT Id FROM Opportunity WHERE StageName='Closed Won') FROM Account=:listaccts]; return cantdelete; }
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
Glad it worked out.
Please choose best answer.
Thanks