Showing posts from March, 2014

How to get User Roles for different available companies

How to get User Roles for different available companiesHi Friends,

Recently i come to a user requirement, they need all employees details with they roles and permission within different companies.

So here the code to fetch respective details in text file.

staticvoid UserRolebyCompany(Args _args) {
    TextIo              txIoRead,txIoWrite;     FileIOPermission    fioPermission; container           containFromRead; int                         xx,iConLength; str                         sTempPath,sFileName = "UserRolebyCompany.txt", sOneRecord;     SecurityUserRole     SecurityUserRole;     SecurityUserRoleCondition   SecurityUserRoleCondition;     SecurityRole         SecurityRole ;     UserInfo             userInfo;     Company              comp; container            cont;     ;
//To Get the temporary file path.     sTempPath = WINAPI::getTempPath();     info("File is at: " + sTempPath + sFileName);
// Assert permission for file.     fioPermission = new FileIOPermission         (sTempPa…