SysOperation framework doesn't show input parameters

As title, I added my controller to the menuItem and my and i can see the dialog, but when i press ok i get this error:

controller class:

class ServiceLevelSupplierController extends SysOperationServiceController
    public static void main(Args _args)
        ServiceLevelSupplierController controller = new ServiceLevelSupplierController(classStr(ServiceLevelSupplierController),methodStr(ServiceLevelSupplierService,process),SysOperationExecutionMode::Synchronous);


Contract class:

class ServiceLevelSupplierContract 
    StartDate                       startDate;
    int                             numberOfMonths;
    str                             packedQuery;

    public StartDate parmStartDate(TransDate    _startDate = startDate)
        startDate = _startDate;

        return startDate;

    public Int parmNumberOfMonths(Int     _numberOfMonths = numberOfMonths)
        numberOfMonths = _numberOfMonths;

        return numberOfMonths;

        AifQueryTypeAttribute('_packedQuery', queryStr(ServiceLevelSupplierQuery))
    public str parmQr(str _packedQuery = packedQuery)
        packedQuery = _packedQuery;
        return packedQuery;

    public void setQuery(Query _query)
        packedQuery = SysOperationHelper::base64Encode(_query.pack());

    public Query getQuery()
        return new Query(SysOperationHelper::base64Decode(PackedQuery));

Service class:

class ServiceLevelSupplierService extends SysOperationServiceBase
    QueryRun                             queryRun;
    StartDate                            startDate;
    int                                  numberOfMonths;
    PurchTable                           purchTable;
    PurchLine                            purchLine;
    VendTable                            vendTable;
    CalculationOfServiceLevel            CalculationOfServiceLevel;

    public void process(ServiceLevelSupplierContract  _contract)
        queryRun = new QueryRun(_contract.getQuery());


        while (
            purchTable     = queryRun.get(tableNum(PurchTable));
            purchLine      = queryRun.get(tableNum(PurchLine));
            vendTable      = queryRun.get(tableNum(VendTable));
            CalculationOfServiceLevel.VendAccount = vendTable.AccountNum;

    public void getPromptParameters(ServiceLevelSupplierContract _contract)
        startDate                   = _contract.parmStartDate();
        numberOfMonths              = _contract.parmNumberOfMonths();


what’s wrong?

I don’t see any obvious problem with your code.

What if you rebuild your code? Only partially updated code would explain this behavior.

Also, what method do you show in your screenshot? What are values of methodName and proxy?

By the way, SysEntryPointAttribute is deprecated.

HI, the method of the screenshot is : private static void runOperationInstance(SysOperationServiceController controller), and methodName ="" proxy = {Dynamics.AX.Application.ServiceLevelSupplierController} Microsoft.Dynamics.Ax.Xpp.XppObjectBase {Dynamics.AX.Application.ServiceLevelSupplierController}

Trying to call a method without any name is clearly wrong, the question is why it’s happening. I would start by rebuilding the solution, because it might solve the problem.

I rebuilt the solution, without any result.

Then I would build the whole module and if it didn’t help, I would debug the code to see why methodName is empty.

1 Like