Refreshing options

There are three refreshing options available in AX "Refresh data", "Refresh AOD" and "Refresh dictionary". Many a times it is required that we trigger these events through code directly. For doing these following three classes can be used.
 
    • SysFlushAOD
    • SysFlushData
    • SysFlushDictionary

Here is a sample job which explains there usage

static void refreshOptions(Args _args)
{
    Args       args;
    ;
    /*
     * Please note after refreshing the AOD if you do not want infolog for the operation
     * create an object of Args and in parmEnum method pass NoYes::Yes
     */
    new MenuFunction(menuitemactionstr(SysFlushAOD), MenuItemtype::Action).run();
 
   
    /*
     * Please note refreshing the data if you do not the infolog for the operation
     * create an object of Args and in parmEnum method pass NoYes::Yes
     * In this case the infolog appears only in case of webSessions
     */
    new MenuFunction(menuitemactionstr(SysFlushData), MenuItemtype::Action).run();
 
    /*
     * Please note after refreshing the dictionary if you do not the infolog for the operation
     * create an object of Args and in parmEnum method pass NoYes::Yes (shown below for this option)
     */
     args = new Args();
     args.parmEnumType(enumnum(NoYes));
     args.parmEnum(NoYes::Yes);
     new MenuFunction(menuitemactionstr(SysFlushDictionary), MenuItemtype::Action).run(args);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s