Quantity Field

hhhhhhhqathhhhhhhqat Member Posts: 111
if i have field quantity in purchase line , i need the user to enter quantity , and can't go for next line untill fill this fiedl what's the code i should add in this trigger , i try the following but not ok

testfield(quantity);


also

if quantity <> 0 then

amount = quantity * unit cost else

error ('you must enter quantity');


what's the correct code should add , thanks for help

Comments

  • kinekine Member Posts: 12,562
    Please, do not do that. Search for "mandatory field", you will see many discussions about possible problems with this. I suggest to add test for this rule when you are releasing the document, not when entering/moving from one line to another. It will be much easier, maintainable, without side-effects and "In NAV way"...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.