Saving an Apex class with a statically invoked flow throws an ISE
Last updated 2021-01-08 ·Reference W-8538344 ·Reported By 2 users
When attempting to save an apex class when adding statically invoked code logic, the class fails to save and throws an internal server error. This happens when the flow contains a resource variable of type record using the entities Tenant Usage Entitlement and Skill and the variables have "Availability Outside the Flow" checked.
- Expected Result:
Class saves with no issue.
- Actual Result:
Class fails to save and an ISE is thrown.
1) Create an auto launched flow.
2) Add a GetRecord element and attach it to the start element.
3) Create a new resource variable with type record. Select object type as "Tenant Usage Entitlement" or "Skill".
4) Create a new apex class with a test method.
5) Add code logic to statically invoke the auto launched flow in the test method then attempt to save.
6) Observe an ISE is thrown.
- Call the flow dynamically.
- Uncheck "Availability Outside the Flow" if it is unecessary.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.