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.
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('...');
Comments
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 specialist
CurrForm."Line Discount %".maxvalue:=10;
and
CurrForm."Line Discount %".maxvalue(10);
but it don't work
That's not possible.
There aren't much properties in NAV which you can modify by code..
Tino Ruijs
Microsoft Dynamics NAV specialist
That's not possible.
There aren't much properties in NAV which you can modify by code..
Tino Ruijs
Microsoft Dynamics NAV specialist
for example:
Line Discount % - OnAfterValidate()
Salessetup.GET;
IF "Line Discount %" > Salessetup."Max Discount Allowed" THEN
ERROR('...');
http://www.BiloBeauty.com
http://www.autismspeaks.org