+ Start a Discussion
steven.fouracresteven.fouracre 

Invocable Method Failure

I've created an Invocable Method but Im getting a failure

Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. <br>A flow trigger failed to execute the flow with version ID 301d0000000LHot

Here is the method
    @InvocableMethod(label='Count_Characters_In_Function' description='')
    public static void processType(KeyValueInv[] kvLst){
//some basic code
//even changed to just putting system.debug
}

I've got an inner class which is basic

public class KeyValueInv {
    @InvocableVariable(label='key1' required=true)
    public String key1;
}

I can select everything as normal in the PB but it fails

Please help?
Phillip SouthernPhillip Southern
Steven, the error response is a bit cryptic I agree.  What I would suggest is the following:

1.) If you're getting the email error message with the flow error, there might be a second email coming across with the Apex code error.
2.) Try doing some debug statements in your code and testing this.  Then you can check the debug log or in the dev console to see what's going on. If it is erroring from the code, and you're performing inserts, its possible other downstream items could also be causing the issue.