Password dialog box

pvar
Member Posts: 157
Is there a way I can accept a password through a dialog box but not displaying what the user type(* instead), something similar to PasswordText property of a textbox on a form? Thanks.
0
Comments
-
Why not just make the font color of the text box white?Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
I don't have a textbox, the password is inputed to a variable of the dialog like below.
gdlgWindow.INPUT(1,gtxtPassword);0 -
I would not use the window Dialog. The dialog is a very limited variable in Navision.
It is better to create a form.0 -
I tried using a form first but I couldn't get the return action from the form properly and that is when I turned to dialog.
I need to achieve the following.
1. Continue the processing if the user input the correct password.
2. Abort the processing if the user Escaped or hit Cancel on the password form
How do I know if the user did one of the above from the calling function? Thanks for any help.0 -
something like
variables:
gfrmFormPassword type form
gfrmFormPassword.LookUp(TRUE);
IF gfrmFormPassword.RUNMODAL = ACTION::LookupOK THEN
password := gfrmFormPassword.FunctionToReturnPassword
ELSE IF gfrmFormPassword.RUNMODAL = ACTION::LookupCANCEL THEN
........Andre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
Somehow this doesn't work. The control is not coming to the THEN part when the user type in the correct password. But if I change the ACTION to CLOSE it comes there, then the problem is it always comes to the THEN part( Even when the user hit Esc or click Cancel on the password form)0
-
The user has to click ok after inserting passwordAndre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
Still doesn't work. This is the code in the calling function
gfrmPassword.LOOKUPMODE(TRUE);
IF gfrmPassword.RUNMODAL = ACTION::LOOKUPOK THEN
ChangeSubMenu(50242);
CLEAR(gfrmPassword);
and this is the code on the Onpush() of the Ok button on the Password form
IF gtxtPassword = 'IT' THEN
CurrForm.CLOSE
ELSE
MESSAGE('Wrong Password, Try again!');
The THEN part doesn't execute if the user type in IT as password0 -
To work you cannot add code in the ok button. Try doing the validation after the password form is closed, or in the validate trigger of the password textbox.Andre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
or, if you prefer like you have now, do something like this:
VarOption integer
gfrmPassword.RUNMODAL;
gfrmPassword.GetValueOption(VarOption)
IF VarOption = 1 THEN
ChangeSubMenu(50242);
CLEAR(gfrmPassword);
On the password form create a global variable VarOption and function GetValueOption to return the value of VarOption
GetValueOption(var pVarOption)
{
pVarOption := VarOption
}
and this is the code on the Onpush() of the Ok button on the Password form
IF gtxtPassword = 'IT' THEN BEGIN
VarOption = 1
CurrForm.CLOSE;
END ELSE
MESSAGE('Wrong Password, Try again!');
Hope this helpsAndre Fidalgo
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com0 -
That worked!! Thank you, andreof, so much for your timley responses and the solution. Thanks to Mibuso as well.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions