mandatory fields

How do you make mandatory fields? I tried in the forms and changing the property mandatory to ‘YES’ I get a red line in the field but still allows me to save the record without an entry in that field

The fields can be setled as Mandatory in Form datasources or directly on hte tables. After that, a red line will appear in the field to prove its status. After adding a new line, you must complete all the mandatory fields, or the record will not be saved after the form is closed. However, you can save a record which mandatory fields are not set when working with X++ code. Regards, Ciprian

quote:

However, you can save a record which mandatory fields are not set when working with X++ code.

You can force a check for mandatory fields by calling method table.validateWrite() before the insert/update-methods.