April 08, 2014

MICROSOFT DYNAMICS AX 2012 R3 LAUNCH EVENT

MICROSOFT DYNAMICS AX 2012 R3 LAUNCH EVENT
Hi All, 

Finally MS comes to lunch DAX 2012 R3.... WOW..
Many of us are waiting for this since a long. Here is some important details for this event

1. Date: April 10, 2014
     Time(s):

2. Agenda

Topic
Overview
Introduction to Dynamics AX 2012 R3
Meet representatives from the Microsoft Dynamics team as they highlight the new features of AX 2012 R3
Business Achievement Showcase
Learn from New Belgium Brewer and Lotus F1 Team on how they have achieved success with Microsoft Dynamics
Analyst Interview
Hear Gartner's Principal Analyst Nigel Montgomery talking about how Business Decision Makers are responding to today's rapidly changing market conditions and the role they are playing to ensure organizations adapt accordingly.
Engage with Customers in their Terms
Learn from the CIO from Ashley Furniture on how they have reimagined their customer experience
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (Retail eCommerce enhancement, new mobile POS and more)
Run Dynamics Operations
Learn how organizations have been able to improve their operations
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (New Transportation capabilities and more)
Expand Rapidly
Join the CEO of Kathmandu as he explains how Dynamics has helped them expand their business
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (New Warehousing capabilities and more)
Special guests
Engage with Microsoft special guests!.
Closing Comments
Learn how you can take the next steps to transform your company into a dynamic business that delivers amazing customer experiences

3. Registration Link   (I just did it :)


Guys don't miss it.....


-Harry

March 17, 2014

How to get User Roles for different available companies

How to get User Roles for different available companies

Hi 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.



static void 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
        (sTempPath + sFileName ,"RW");
    fioPermission.assert();

    // If the test file already exists, delete it.
    if (WINAPI::fileExists(sFileName))
    {
        WINAPI::deleteFile(sTempPath + sFileName);
    }
   
    // "W" mode overwrites existing content, or creates the file.
    txIoWrite = new TextIo( sTempPath + sFileName ,"W");
        while select SecurityUserRole
    {
        cont = conNull();
        select SecurityRole  where SecurityRole .RecId == sur.SecurityRole;
        select userInfo where userInfo.id == SecurityUserRole.User;
        while select surc where SecurityUserRoleCondition.SecurityUserRole == SecurityUserRole.RecId
        {
              cont += SecurityUserRoleCondition.DataArea;
        }
        if(!cont)
        {
            txIoWrite.write(strFmt("%1 -- %2 -- %3 -- %4 -- %5 -- %6",userInfo.name, userInfo.networkAlias,userInfo.company,SecurityUserRole.User, SecurityRole .Name,"ALL"));
        }
        else
        {
            txIoWrite.write(strFmt("%1 -- %2 -- %3 -- %4 -- %5 -- %6",userInfo.name, 
userInfo.networkAlias,userInfo.company,SecurityUserRole.User, SecurityRole .Name,con2StrUnlimited(cont, ',')));
        }
    }
}


You can fetch your records in Excel file also by modify your code.

-Harry