Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Pass multiple, strongly typed parameters from Process Builder to Apex #2
public class ProcessHandlerShowOpps {
public class OpportunityParameter{
public Id oppId;
public String name;
public Decimal amount;
public Date closeDate;
@InvocableMethod(label='showOpps' description='Reconstitue the Opportunities being passed from Flow')
public static void showOpps(OpportunityParameter[] opportunityParameters) {
Opportunity[] opps = new Opportunity[]{};
for(OpportunityParameter opp : opportunityParameters) opps.add(new Opportunity(Id=opp.oppId,,Amount=opp.amount,CloseDate=opp.closeDate));
system.debug('****** opps: '+opps);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.