validating the domain or check whether user is enabled in dynamics ax


Description:-

This job gets the user related information only if domain is correct and user is enabled.

static void validateDomain_getDetails(Args _args)
{
    xAxaptauserManager um = new xAxaptauserManager();
    xAxaptaUserdetails userdetails;
    ;
    if(um.validateDomain('DomainName'))
    {
        userdetails =  um.getDomainUser('DomainName','username');
        if(userdetails.isUserEnabled(0))
        {
            printuserdetails.getUserName(0);
            printuserdetails.getUserMail(0);
            printuserdetails.getUserSid(0); 
            pause;
        } 
    }
}

Related Posts

Previous
Next Post »

Thanks for comments.....