Here is the code:
for(Requests curRequest : requestList){
if (curRequest.varSRProduct!= null ){
for(SObject so : curRequest.varSRProduct){
//code
}
}
}
Wrapper Class: Wrapper class
global class Requests {
@InvocableVariable global Boolean isActive;
@InvocableVariable global Boolean srBoolean;
@InvocableVariable global List<SObject> varSRProduct = new List<SObject>();
}
global class Results {
@InvocableVariable global List<SObject> varSupportedProducts;
}
- requestList - Wrapper class
- varSRProduct - List of objects
Tried isEmpty
, list size()
. Nothing is working except requestlist[0].varSRProduct!= null
which is not a good practice.
varSRProduct
in your code.