FinalizerContext enums not recognized as static
Issue #1926
resolved
Apex Transaction Finalizers have a new System class called FinalizerContext. The success/failure of the attached Queueable is reported with an enum value.
Here’s sample code (that is correct):
public void execute(FinalizerContext context) {
if(context.getResult() == ParentJobResult.UNHANDLED_EXCEPTION) {
// handle error
}
}
This code is flagged by Illuminated Cloud with the following error message:
Non-static field cannot be referenced from a static context
Comments (3)
-
repo owner -
reporter I have turned it off and back on again and can confirm it is working now. (regenerated OST).
-
reporter - changed status to resolved
- Log in to comment
Chuck, have you regenerated your OST recently? If not, please do so. Those should be emitted into the OST as enums now. Here's what I have: