maxvalue by code

did36
Member Posts: 25
is it possible to modify maxvalue in a form (or table) by code?
thanks
thanks
0
Comments
-
I know it's possible with minvalue.
So probably with maxvalue too. Yep, it is also possible by code. Just tested it.
If maxvalue is 5, you can enter Value := 10 in code.
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
I'm test :
CurrForm."Line Discount %".maxvalue:=10;
and
CurrForm."Line Discount %".maxvalue(10);
but it don't work0 -
Sorry. I misunderstood you.
That's not possible.
There aren't much properties in NAV which you can modify by code..
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
thanks0
-
Sorry. I misunderstood you.
That's not possible.
There aren't much properties in NAV which you can modify by code..
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
what about onValidate trigger?0
-
Yes, I can do with code on onvalidate, but my question is it's possibble to manage maxvalue By code0
-
Yes, of course.
for example:Line Discount % - OnAfterValidate() IF "Line Discount %" > 10 THEN ERROR('...');
0 -
if your thinking of setting a set value like "10" i wold suggest adding a field to the sales setup caled Max Discount allowed. there you can store your number and be able to change it easily if needed.
Line Discount % - OnAfterValidate()
Salessetup.GET;
IF "Line Discount %" > Salessetup."Max Discount Allowed" THEN
ERROR('...');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