Setting Mandatory Fields

How do you make some Navision fields mandatory, for example, i want all purchase orders to have a purchaser code so that in future, i can list purchase orders by purchaser, so the purchaser code must be mandotory.

Precious
  • Sorry but that's not true. You can use the property NotBlank only for Primary Key fields. Also, the code you wrote works only if the user goes on the field and writes something in it and is not useful if you set the property.
    In Navision all the controls on the field are put in the posting routines and not before. So, if you want a field mandatory, you have to put your control in the posting routing. If the user wants the control before the posting, then the correct question is: when I have to control? If you want to control before closing the form, for example, just write your code in the OnCloseForm trigger and so on...

    Best regards,
    Marco Ferrari

  • I don't think the trick with OnCloseForm will work - there is no such facility in N3-version!

    What you have to do is to test the field in

    1. the MODIFY-trigger on the purchase-table. But beware: if you use the ERROR-command, you will loose all changes made in the table since last MODIFY.

    2. in the posting-routine

  • Sorry, but my post was a reply to a post (that has been deleted!) that referred the example in Attain/Financials.

    bye
    Marco

Related