1

When canGoBatchJournal returns true, a RunBaseBatch can be created in Ax via the System administartion > Inquiries > Batch > New > Task > New >[ClassName:MyRunBaseBatch].

I have a couple of features which have been created using the SysOperation framework however. This method doesn't inherit the canGoBatchJournal method. Is there a way to make them visible in the above mentioned menu as well?

Reinard
  • 3,624
  • 10
  • 43
  • 61

3 Answers3

1

I took a dive into how to form control retrieves it's data. There is an SysOperationJournaledParametersAttribute attribute which you can use.

Reinard
  • 3,624
  • 10
  • 43
  • 61
1

Below is an example of how the attribute would be applied to a controller. This example shows how the controller calls the custom service. The controller can then be used in as a batch task or you could call the controller from a menu to get the batch dialog to display.

[SysOperationJournaledParametersAttribute(true)]
class YourCustomController extends SysOperationServiceController
{
    public void new()
    {
        super();

        this.parmClassName(classStr(YourCustomService));
        this.parmMethodName(methodStr(YourCustomService,processOperation));
        this.parmDialogCaption("dialog caption");

    }

    public ClassDescription caption()
    {
        return "class description";
    }

    public static void main(Args args)
    {
        YourCustomController controller;

        controller = new YourCustomController();
        controller.startOperation();
    }

}

Below would be the custom service the controller calls.

class YourCustomToolService extends SysOperationServiceBase
{
    public void processOperation()
    {
        // Call your code to do run your custom logic
    }

}
maguy
  • 1,599
  • 1
  • 15
  • 26
0

If you implement the SysOperation framework, it should already be good as SysOperationController implements the Batchable interface.

You can refer to this white paper: https://www.microsoft.com/en-us/download/details.aspx?id=29215

Geoffrey DELMEE
  • 772
  • 4
  • 8