web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Password style field is not getting displayed properly in form

(0) ShareShare
ReportReport
Posted on by 1,307

Hi,

I have a table with 2 fields userid (userinfo.userid) and password.

I am creating  a form for the above table. I added a grid with a userid field and a password method field with passwordstyle set to YES. Instead of showing password in dots (password style) , the password is shown in text.

Could some one help out what went wrong

 

FormRun method:

void writeTable()

{

    SMCpersonalizationUsers_ds.write();

}

here is the password method code: 

DataSource method: (this is the password method)

//BP deviation documented

edit Password password(boolean set, SMCPersonalizationUsers _SMCPerForms, Password _password)

{

if(set)

    {

if(!SMCPersonalizationUsers.RecId)

            element.writeTable();

        _SMCPerForms.Password = Cryptography::encrypt(savepassword, int2str(any2int(_SMCPerForms.RecId)));

    }

return _SMCPerForms.Password;

}

 

 

password string control --> validate method

Boolean validate()

{

boolean ret;

    ret = super();

    savepassword = this.text();

if (Cryptography::encrypt(savepassword, int2str(any2int(sMCPersonalizationUsers.RecId))) == sMCPersonalizationUsers.Password)

    {

        Box::stop("Password already in use");

        this.setFocus();

return false;

    } 

return ret;

}

 

Thanks,

Lakshmi

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Do you have the same problem if you bind your control to a field instead of a method?

  • Lakshmi Karambakkam Profile Picture
    1,307 on at

    Hi Martin,

    I have the same problem. But when I keep the cursor on the password field,  it is showing it as dots and when I move the cursor to another field, it is showing as text. Password method field also shows the same behavior.

    Thanks,

    Lakshmi

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    I'm not sure what you mean by "password method field". Please give me a favour: create a completely new form and try a PassworkStyle field (no method!) there. If it doesn't work, make sure that you have all updates and if you do, report a bug to Microsoft.

    If it works, try it with a method.

    This will make sure that the problem isn't caused by some code in your own form.

  • Lakshmi Karambakkam Profile Picture
    1,307 on at

    Hi Martin,

    that's what I told in my previous post. I tried a new form with a password style field and it also did not work. Password method field means a string control by passing the password method. Both are not working. I am not sure this is a Microsoft bug because many create password field related forms in Dynamics AX. I think I am missing something that is causing the error.

    lakshmi

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    another point:-

    in your edit method you re using return Type s Password; I m not sure which this DataType(EDT) represent.

    instead, you may give a try to use DataType/EDT SMTPPassword as can be seen in a standard implementation at following path

    AOT\Forms\SysEmailParameters\Data Sources\SysEmailSMTPPassword\Methods\setPassword

  • Suggested answer
    Lakshmi Karambakkam Profile Picture
    1,307 on at

    I found the problem. The reason for password field fluctuating between text and password style is because the password field is in a grid.

    I moved the field to Group and the field is working fine.

    Thanks for everyone who tried to help me.

    Lakshmi

  • Community Member Profile Picture
    on at

    Yes, If you move field from the grid, No need edit Password method to write, by setting property itself it works..

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans