You need to sign in to do that
Don't have an account?
Øyvind Borgersen 10
Flow Apex return list to use in picklist
Hi,
I have a scenario where I need to paste one single value from a flow to an apex class and run a query and return the result back to the flow to be used as a picklist choice. The code below does not work sufficiently. Can anyone advice?
public class ProductArrangementCollection {
@InvocableMethod(Label='Terms' description='Insert Terms value')
public static List<ID> FindProductArrangement(List<string> Terms) {
List<ID> Ids = new List<ID>();
Product_Arrangement__c c = [Select id from Product_Arrangement__c where Actual_start_date__c = 'Terms' limit 10];
if(c != null) {
Ids.add(c.Id);
}
return Ids;
}
}
I have a scenario where I need to paste one single value from a flow to an apex class and run a query and return the result back to the flow to be used as a picklist choice. The code below does not work sufficiently. Can anyone advice?
public class ProductArrangementCollection {
@InvocableMethod(Label='Terms' description='Insert Terms value')
public static List<ID> FindProductArrangement(List<string> Terms) {
List<ID> Ids = new List<ID>();
Product_Arrangement__c c = [Select id from Product_Arrangement__c where Actual_start_date__c = 'Terms' limit 10];
if(c != null) {
Ids.add(c.Id);
}
return Ids;
}
}
Hi Øyvind,
Are you able to get the results from SOQL?
Thanks,
Sucharita
Not really, it's not reflecting the variable in the input parameter, but that's another issue.