boolean CheckSecurityTable(TableId myTableId)
{ SysDictTable SysDictTable;
;
SysDictTable = new SysDictTable(myTableId);
if(SysDictTable.rights()<AccessType::View)
return false;
return true;
}
If you like your code a little more condensed, you could always use the built-in function hastableaccess. For example:
if(hastableaccess(tablenum(SalesLine),AccessType::View))
return true;
Something similar, but now with a menuitem:
boolean CheckSecurityMenu(MenuName myMenuName)
{ SysDictMenu SysDictMenu;
;
SysDictMenu = SysDictMenu::newMenuItem(myMenuName,MenuItemType::Display);
if(SysDictMenu.rights()<AccessType::View)
return false;
return true;
}
Greetz,
Willy
It is always brilliant & easy way of check table access using code. It is quite easy & also helps in saving many time as compared to check the table manually.
ReplyDeleteERPTREE Offering Oracle fusion HCM online training, Oracle Fusion SCM Online Training, Oracle fusion financials online
ReplyDeletetraining, Oracle fusion hcm training, Oracle fusion scm training, Oracle fusion financials training, Oracle fusion dba online training in Hyderabad, Bangalore,Gurgon, Noida, India, Dubai, UAE, USA, Kuwait, UK, Singapore, Saudi rabia, Canada, Delhi, Chennai, Kolkata, Pune, Mumbai, Ahmedabad.
Oracle Fusion HCM Training