AX / D365FO – Disable Batch retries via code X++

Disable retries when you call a batch via code (sysOperation or Runbase)

YourControllerClass controller = new YourControllerClass();
controller.parmShowDialog(false);
controller.parmShowProgressForm(false);
        controller.parmExecutionMode(SysOperationExecutionMode::Synchronous);

//Disable retries     controller.batchInfo().parmRetriesOnFailure(0);
        
controller.startOperation();

Disable retries in the main method of the batch via code (sysOperation or Runbase)

public static void main(
        Args    _args
        )
    {
        YourControllerClass controller      = YourControllerClass::construct();
        controller.initializeFromArgs(_args);
        
//Disable retry on failure
controller.batchInfo().parmRetriesOnFailure(0);
        
        controller.startOperation();
    }

One response to “AX / D365FO – Disable Batch retries via code X++”

  1. Rachel R. Johnson Avatar
    Rachel R. Johnson

    Disabling batch retries in AX/D365FO via X++ code can help prevent unnecessary retries and improve system performance. Tools like RSL helper can assist in managing and automating this process, making code implementation more efficient.

    Like

Leave a comment