I need to update status values to the custom object Loan application so used apex class and to call in process builder it caused an error Error:**Only one parameter is supported on methods with
can please help me out to reslove this code

Can you please help me out

  • my code
public class Applicationsign { 

    @invocablevariable(label='Send Overall Quantum Details') 
    public static void updateApplication(Id sourceId, string value){ 
        Loan_Application__c qa = new Loan_Application__c(); 
        qa.Id = sourceId;
        qa.Status__c = value; update qa; 

InvocableMethod can have at most one input parameter, but it could be

A list of a user-defined type, containing variables of the supported types above or user-defined Apex types, with the InvocableVariable annotation. Create a custom global or public Apex class to implement your data type, and make sure that your class contains at least one member variable with the invocable variable annotation.

So you should define a custom class with the needed parameters annotated with InvocableVariable.

public class InvocableRequest {
    public String sourceId;
    public String value;

Then signature of your method could be
public static void updateApplication(List<InvocableRequest> loadData)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.