This Set the Maximum Depth of Chained Queueable Jobs (Generally Available) is GA and documented to work in:
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.
When I try this in my scratch org ("edition": "Developer",
) using API 62 Apex:
AsyncOptions asyncOptions = new AsyncOptions();
asyncOptions.MaximumQueueableStackDepth = 50;
asyncOptions.MinimumQueueableDelayInMinutes = delayMinutes;
System.enqueueJob(q, asyncOptions);
I get this error:
Cannot reset Maximum Queueable Stack Depth in a queueable
Has anyone seen this working? Any idea why it isn't working in my situation?
(There is an example of it not working here Salesforce Queueable AsyncOptions.)
System.enqueueJob(q);
without the maxDepth