You need to sign in to do that
Don't have an account?

SOQL with "IN"
Hi,
How do you "read" (in plane English) this piece of code?
Create a variable of the type List<OpportunityShare> which is called oppShareList and assign the following records to such list: all records (display the fields Id, OpportunityAccessLevel, etc...) FROM the table OpportunityShare WHERE ...????
I do not understand the code after the WHERE
Could someone explain?
Thank you very much.
How do you "read" (in plane English) this piece of code?
List<OpportunityShare> oppShareList = [select Id, OpportunityAccessLevel, RowCause from OpportunityShare where OpportunityId IN :opportunityIdList and RowCause = 'Team'];My interpretation is...
Create a variable of the type List<OpportunityShare> which is called oppShareList and assign the following records to such list: all records (display the fields Id, OpportunityAccessLevel, etc...) FROM the table OpportunityShare WHERE ...????
I do not understand the code after the WHERE
Could someone explain?
Thank you very much.
WHERE the Opportunity ID is in another list somewhere in your class or trigger which also has "Team" populated for the RowCause field.
Does this help?
Shawn
All Answers
WHERE the Opportunity ID is in another list somewhere in your class or trigger which also has "Team" populated for the RowCause field.
Does this help?
Shawn
Are you saying that the meaning is:
WHERE the field OpportunityId is included in the List OpportunityIdList AND the field RowCause (in the table OpportunityShare) is equal to 'Team' ?
Is this the correct interpretation of the SOQL code after WHERE ?
Thank you.