I want to disable the security policy for some forms. It is better to disable security policy when user clicks on the menu item. Otherwise we should consider all lookup and fields which I think it is not a good approach. i.e. We should use uncheck::XDS in every method required. One solution is linking each display menu item to action menu item. In the main method of the action menu item we disable the security policy then run the related display menu item.
public static class ActionMenuItem
{
static void main (Args _args)
{
unchecked(Uncheck::XDS)
{
MenuFunction mf;
mf= new MenuFunction(menuItemDisplayStr(myDisplayMenuItem), MenuItemType::Display);
mf.run(_args);
mf.wait();
}
}
}
Actually, I think the above approach is not best practice, I should modify each display menu item and create a class multiple times. I am searching for the better solution which are more efficient.