How to flush AOS cache form code

11 Dec

Flush the AOS cache from code

Under Menu items > Action, duplicate all these 3 menu item actions and three menu action items that can be used to flush system data, the AOD, and dictionary
1. SysFlushAOD
2. SysFlushData
3. SysFlushDictionary

Duplicate these 3 menu action items and give them a new name


These three are running on “Called From” which when we run it on client side, it will clear client cache. We need to be able to clear AOD, sys data and dictionary and cause a refresh, therefore, we need to change it to “Server”

Go to RunOn property and change it from “Run-On” to “Server”


Now, start run each menu action item one by one.

static void DevClearCache(Args _args)
#define.FlushAOD(“DevSysFlushAOD”)                  // replace with your own menuitem name
#define.FlushData(“DevSysFlushData”)                // replace with your own menuitem name
#define.FlushDictionary(“DevSysFlushDictionary”)    // replace with your own menuitem name
Args args = new Args();
MenuFunction mf;

// Flush AOD
mf = new MenuFunction(menuitemActionStr(#FlushAOD), MenuItemType::Action);;

// Flush Data
mf = new MenuFunction(menuitemActionStr(#FlushData), MenuItemType::Action);;
info(“Data has been refreshed”);

// Flush Dictionary
mf = new MenuFunction(menuitemActionStr(#FlushDictionary), MenuItemType::Action);;

You can download the entire project here.

Leave a comment

Posted by on December 11, 2013 in Development


Tags: , , , , , ,

Leave a Reply

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

You are commenting using your 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


Get every new post delivered to your Inbox.

Join 165 other followers

%d bloggers like this: