Validation of field

somnathbasu9002somnathbasu9002 Member Posts: 47
edited 2006-04-15 in Navision Attain
In the Sales Line table I have inserted a new field (Quantity in Sales unit). I am trying to validate field quantity by writing code in OnValidate trigger of the new field. The syntax is
Validate(Quantity,<New Value>)

Although the value in Quantity field is getting modified, but Validation of Quantity field is not happening. Plz send suggestion ASAP.

Comments

  • krikikriki Member, Moderator Posts: 9,112
    Probably it is because somewhere in the validation-code (or the functions it calls) of field "Quantity" there is some code like "IF CurrFieldNo = FIELDNO(Quantity) THEN".
    Check for "CurrFieldNo". This is the fieldno of the field that the user has just left. And if you VALIDATE "Quantity" from another field "CurrFieldNo" is NOT equal to FIELDNO(Quantity) but equal to your new field with the result that some things are not executed.

    PS I never found any help on this "CurrFieldNo"-thingy!
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • lakshmivallurulakshmivalluru Member Posts: 168
    Are you calling this code Validate (quantity,<new value>) from the field validate trigger of new field from FORM??? then please move your code to table level.hopr you got the point.
    LR
Sign In or Register to comment.