What kind of field? Does this record have a start date or posting date that can be used to calculate it's age?
It is a password field - What I need is every week the user can change there password. Once a change has been made it will then become uneditable till the next week
The correct way to do this is to add code to the onvalidate trigger of the field and give an error. Not making the field non editable in the form. [-X
Can you imagine what you are teaching him? Instead of testing fields and checking as is standard in Navision, he is going to think its OK to write code that makes fields on forms editable to prevent users changing them.
DaysSinceLastChanged := TODAY-DT2DATE("Password Last Changed");
if DaysSinceLastChanged < 8 then begin
Error('Password Change Not Allowed');
end else begin
"Password Last Changed" := today;
modify;
end;
but what's forcing them to make the change?
What form/table is this "User Table"?, are you having it pop up each week by calcing the expiration date?
are they changing it every week? why?
If I had to change passwords every week I'd quickly forget which I have used last.
DaysSinceLastChanged := TODAY-DT2DATE("Password Last Changed");
if DaysSinceLastChanged < 8 then begin
Error('Password Change Not Allowed');
end else begin
"Password Last Changed" := today;
modify;
end;
but what's forcing them to make the change?
What form/table is this "User Table"?, are you having it pop up each week by calcing the expiration date?
are they changing it every week? why?
If I had to change passwords every week I'd quickly forget which I have used last.
Well thanks everyone - Im going to do this right. So let me explain what I want to do
I have a Password field that I need to change every Month for each ID.
I need a msg to pop up every time it has to change.
It needs to be forced every month.
I am currently using a Staff table (This is not the main user table)
I have a Password field that I need to change every Month for each ID.
What do you mean by Password? If you mean the Navision log in password or something like that, then all this is managed in Active Directory and has no place what so ever in Navision.
If this is some kind of secondary password management process, then maybe you are doing the whole thing wrong and need to explain what you are doing and why.
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
It is a password field - What I need is every week the user can change there password. Once a change has been made it will then become uneditable till the next week
Thanks
and in which table?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Yes there is an existing field "Password Last Changed" which has the last time the password was changed.
Its on a Staff table.
Thanks
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Mmmh Seems like Im missing something
use this function
Date := DT2DATE(Datetime)
The datetime of which you want to return the date part.
http://msdn.microsoft.com/en-us/library/dd301385.aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org
So try
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
The correct way to do this is to add code to the onvalidate trigger of the field and give an error. Not making the field non editable in the form. [-X
Can you imagine what you are teaching him? Instead of testing fields and checking as is standard in Navision, he is going to think its OK to write code that makes fields on forms editable to prevent users changing them.
if DaysSinceLastChanged < 8 then begin
Error('Password Change Not Allowed');
end else begin
"Password Last Changed" := today;
modify;
end;
but what's forcing them to make the change?
What form/table is this "User Table"?, are you having it pop up each week by calcing the expiration date?
are they changing it every week? why?
If I had to change passwords every week I'd quickly forget which I have used last.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Well thanks everyone - Im going to do this right. So let me explain what I want to do
I have a Password field that I need to change every Month for each ID.
I need a msg to pop up every time it has to change.
It needs to be forced every month.
I am currently using a Staff table (This is not the main user table)
Thanks everyone :P
What do you mean by Password? If you mean the Navision log in password or something like that, then all this is managed in Active Directory and has no place what so ever in Navision.
If this is some kind of secondary password management process, then maybe you are doing the whole thing wrong and need to explain what you are doing and why.