To Keep password while logging into AX application:

Hi,
To keep a password while logging into AX,
Use the first method that is called while logging into AX. i.e,
Application(Class) > startuppost() method.

void startupPost()
{
dialog d;
dialogfield df, df1, df2;
userinfo user;
boolean ret;
;

d = new dialog(“Password”);
df = d.addField(typeid(userid),”UserName”);
df1 = d.addField(typeid(userid),”UserName”);
df2 = d.addField(typeid(string30),”Password”);
df.value(curuserid());
select user
where user.id == curuserid();
if(user)
{
df1.value(user.name);
}
df1.allowEdit(false);
df1.displayLength(25);
while(d.run())
{
if(!(df2.value() || df2.value() == ‘chaitu’))
{
infolog.shutDown(true);
throw error(“wrong password”);
df2.doNull();
continue;
}
else
{
ret = true;
break;
}
}
if(ret == false)
{
infolog.shutDown(true);
}
}
Output:
tytg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s