I am trying to pass 2 ID's into an apex action from a flow that just query's a subset of ID's and passes it back to the flow. I'm getting the following error for both my invocable variables inside the class: 'Variable does not exist: 'userId', 'Variable does not exist: 'projectId'
global class parseAssignmentShares {
public class flowInputs {
@InvocableVariable(required=true)
public ID projectId;
@InvocableVariable(required=true)
public ID userId;
}
@InvocableMethod (label = 'Enter Id(s)' description = 'Passes the Project and User Id into the apex class for a nested query.')
public static List<pse__Assignment__Share> getProjectId (List<flowInputs> p){
List<pse__Assignment__Share> shareIds = [SELECT Id
FROM pse__Assignment__Share
WHERE UserOrGroupId =:p.userId
AND ParentId IN
(SELECT Id
FROM pse__Assignment__c
WHERE pse__Project__c =:p.projectId)];
return shareIds;
}
}