This post is machine-translated. The original post in german language can be found here.

SysOperation-Framework: Usage data per MenuItem

Imagine you have a function build using the SysOperation framework that can be called at different places in the system, and you want to make sure that these calls do not share the same usage data.

In such a case you could create two (or more) MenuItems and override the method lastValueDesignName() of the controller as follows. This will store separate usage data for each MenuItem.

protected IdentifierName lastValueDesignName()
{
    IdentifierName ret;

    ret = super();

    if (this.parmArgs() && this.parmArgs().menuItemName())
    {
        ret = this.parmArgs().menuItemName();   
    }

    return ret;
}

By default AX would store the usage data with the name of the called method.

Screenshot

After the modification described above, two data records are stored in the usage data.

Screenshot

In my scenario I used two MenuItems called TutorialSysOperationServiceController and TutorialSysOperationServiceControllerNow.

These post applies to following version:
Dynamics AX 2012

Add comment
 
 
 

 

 
 
 
Posts of the actual month
August 2019
MoTuWeThFrSaSu
 1234
567891011
12131415161718
19202122232425
262728293031 
 
© 2006-2019 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.