Flow Apex-defined type not valid
Detection
- String:
"apexClass" is invalid. Provide the API name of an Apex class that includes an Apex data type supported in flows
Examples
Error Invoice_Flow InvoiceData - "apexClass" is invalid. Provide the API name of an Apex class that includes an Apex data type supported in flows.
Resolution
A variable of the flow uses an Apex-defined type whose class is not in the target org, or has no property the flow can use.
- Deploy the Apex class with the flow: retrieve it from your org with the Metadata Retriever of VS Code, commit it and save your User Story: sfdx-hardis adds it to manifest/package.xml
- With delta deployments, an item that did not change in the Pull Request is not deployed: change it in the Pull Request, or turn on useDeltaDeploymentWithDependencies (https://sfdx-hardis.cloudity.com/salesforce-devops-config-delta-deployment/)
- Check that the properties the flow uses are @AuraEnabled, with types supported in flows