You need to sign in to do that
Don't have an account?
SOQL Query
I need to create a soql query that will query the AccountShare object and return any records that have related users that are not assigned to specific profiles. The profile IDs are 00eE0000000d2WD , 00eE0000000dh09 , 00eE0000000eQAK.
Any thoughts on how to do this?
Hi,
Set<Id> profileIds = new Set<Id>{'00eE0000000d2WD','00eE0000000dh09','00eE0000000eQAK'};
List<AccountShare> accShareList = [SELECT Id FROM AccountShare WHERE UserOrGroupId IN: [SELECT Id User WHERE ProfileId NOT IN:profileIds]];
Thanks for the quick response.
I get an error when trying to post that code in a trigger. The second WHERE clause is what it doesn't like.
Error: Compile Error: unexpected token: WHERE at line 4 column 104
Try this
There was a typo in the response. try: