In a MenuItemBotton, you can select an operation according as your condition.
Args args = new Args();
;
args.record("表名") ;
//访问Form;
if(XXXXXXXX)
new MenuFunction(menuItemDisplayStr(''Unit''),MenuItemType::Display).run(args);
//访问类
else if(XXXXXX)
//new MenuFunction(menuItemActionStr(''Calculator''),MenuItemType::Action).run(args);
//访问报表
esle
//new MenuFunction(menuItemOutputStr(''Currency''),MenuItemType::Output).run(args);