diff --git a/config/project-scratch-def.json b/config/project-scratch-def.json index 61c8d21..40e4e93 100755 --- a/config/project-scratch-def.json +++ b/config/project-scratch-def.json @@ -1,5 +1,4 @@ { "orgName": "kpoorman company", - "edition": "Developer", - "features": ["TransactionFinalizers"] + "edition": "Developer" } diff --git a/force-app/main/default/classes/Chain.cls b/force-app/main/default/classes/Chain.cls index 7d6af54..8502033 100755 --- a/force-app/main/default/classes/Chain.cls +++ b/force-app/main/default/classes/Chain.cls @@ -9,7 +9,7 @@ public class Chain implements Finalizer { public void execute(FinalizerContext context){ Id parentQueueableJobId = context.getAsyncApexJobId(); - switch on context.getAsyncApexJobResult() { + switch on context.getResult() { when SUCCESS { if(this.promises.size() > 0){ Promise next = this.promises.remove(0); @@ -20,7 +20,7 @@ public class Chain implements Finalizer { } when UNHANDLED_EXCEPTION { System.Debug('Parent Queueable (Job ID: ' + parentQueueableJobId + '): FAILED!'); - System.Debug('Parent Queueable Exception: ' + context.getAsyncApexJobException().getMessage()); + System.Debug('Parent Queueable Exception: ' + context.getException().getMessage()); } } }