How to block a filled field

DarkHorse
Member Posts: 389
Hello, I'd like to know how I cant block a filled field; I mean, I have a field on a table, and I want that that field let me fill it only one time, after that it should not let fill it again. What code have I to put?.
Many thanks in advance.
Many thanks in advance.
0
Comments
-
If I have understood the question.
You can use Validation Trigger.0 -
One possible solution could be
YourField - OnValidate() IF xRec.YourField <> '' THEN ERROR('You are not allowed to change the value of %1', FIELDCAPTION(YourField));
Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Fantastic!!!, it works. Thank you both for the help.0
-
Timo Lässer wrote:One possible solution could be
YourField - OnValidate() IF xRec.YourField <> '' THEN ERROR('You are not allowed to change the value of %1', FIELDCAPTION(YourField));
Hi,
Would it be possible to allow some selected user to edit the value ?0 -
if userid = 'whomever'
then
end
else
..lockdown code..
I don't hard coding a specific user id tho - so I would use permissions or a boolean set on the user table.
Here's just one you can modify to fit your needs
http://www.mibuso.com/forum/viewtopic.php?t=23230 -
Savatage wrote:if userid = 'whomever'
then
end
else
..lockdown code..
I don't hard coding a specific user id tho - so I would use permissions or a boolean set on the user table.
Here's just one you can modify to fit your needs
http://www.mibuso.com/forum/viewtopic.php?t=2323
Hi dear thank you for u quick reply.
Since i new in coding in navision i am having difficulty,
I have tried the following
on form open
defined a variables name as "groups" data type "Records" Subtype as user
Code:
Groups.SETRANGE(Groups."Role ID",'Super');
IF (Groups.FIND('-') )THEN BEGIN
CurrForm."Model".visible := false;
CurrForm."Model".editable := false;
END;
Thank you for your help.
Could you advice some common code reading metrial
Regards
Mark0 -
The only reading material other that taking courses is the Application Designers Guide on the product CD &
http://www.geocities.com/powerofthenigh ... ALProg.pdf0 -
Savatage wrote:The only reading material other that taking courses is the Application Designers Guide on the product CD &
http://www.geocities.com/powerofthenigh ... ALProg.pdf
Thank you for the link i will read it and hope it will helpe me,
Ps: was my above coding right?
Regards
Mark0
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