public void insert()
{
UserInfo userInfo,userInfo1;
xAxaptaUserManager Axmanage;
xAxaptaUserDetails Axdetails;
super();
Axmanage = new xAxaptaUserManager();
select firstonly userinfo1;
userInfo.accountType = UserAccountType::ADUser;
userInfo.networkAlias = userinfo1.NetworkAlias;
userInfo.networkDomain = userinfo1.NetworkDomain;
userInfo.id = "USERID";
userInfo.name = "USERNAME";
userInfo.company = userinfo1.companyid;
userInfo.enable = this.Enabled;
// To get SID of user, without this user will not be able to login to ax, just user will be shown into user form
Axdetails = Axmanage.getSIDFromName(this.UserId,this.NetworkDomain,UserAccountType::ADUser);
userInfo.sid = Axdetails.getUserSid(0);
userInfo.insert();
}
{
UserInfo userInfo,userInfo1;
xAxaptaUserManager Axmanage;
xAxaptaUserDetails Axdetails;
super();
Axmanage = new xAxaptaUserManager();
select firstonly userinfo1;
userInfo.accountType = UserAccountType::ADUser;
userInfo.networkAlias = userinfo1.NetworkAlias;
userInfo.networkDomain = userinfo1.NetworkDomain;
userInfo.id = "USERID";
userInfo.name = "USERNAME";
userInfo.company = userinfo1.companyid;
userInfo.enable = this.Enabled;
// To get SID of user, without this user will not be able to login to ax, just user will be shown into user form
Axdetails = Axmanage.getSIDFromName(this.UserId,this.NetworkDomain,UserAccountType::ADUser);
userInfo.sid = Axdetails.getUserSid(0);
userInfo.insert();
}
Thanks a load!
ReplyDelete