When running a report and if Account Teams are enabled you have an option to search "My Account Team and My Accounts". This returns accounts in which you are listed on the sales team or you are the account owner. Below is the SOQL and error I am recieving:
List<Account> acc = [SELECT Id FROM account WHERE Id IN (SELECT accountId FROM accountteammember WHERE UserId = :UserInfo.getUserId()) OR ownerid = :UserInfo.getUserId()];
Error: Semi join sub-selects are not allowed with the 'OR' operator
Is this a dead end? Any ideas how this could be accomplished with SOQL....or maybe even without SOQL.