I tried to get a value from flow.

This is my code which cause error "InvocableMethod methods must be in version 33 or higher":

public static List<List<Opportunity>> getOppIds(List<String>Ids) {
    return new List<List<Opportunity>>();
  • 2
    Please check an API version of the given apex class. It must be higher then 33 as it said in a error description
    – kurunve
    Aug 4 '20 at 11:59
  • Thanks, now it works Aug 4 '20 at 12:26

There is a ClassName.cls-meta.xml that accompanies your class file when you are using SFDX or metadata API to manage your code base. This includes specification of the API version used for that class.

The equivalent information is also available in the Salesforce Setup UI along side the class's code within Custom Code > Apex Classes. In editing a class through this UI there is a "Version Settings" tab to adjust the value.

You need to make sure that the API version is set to 33 or higher.

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.