Options

Mandatory Fields in a Form

moh_baradamoh_barada Member Posts: 46
Hi all,
I have in my form 2 fields requiered,i dont want the user to close the form if this field are Still blank(empty).I just want to know if this is possible to be done in navision.
NB: I dont want to put this 2 fields in the main key cause this method will bring me to other key. :-k
Best Regards
Mohamad Barada
Independent ERP & CRM Consultant
+961 70 912700

Comments

  • Options
    pri_1_ranjanpri_1_ranjan Member Posts: 67
    ya , you can do so by writing codes on OnValidate of the field which when left blank willl throw an error when the error message is executed
    /PDR
  • Options
    ArhontisArhontis Member Posts: 667
    Hi,
    Look at the help about the NotBlank property of a field:
    NotBlank
    Use this property to force the user to make an entry into this field, if the user has selected this field.

    Applies to
    Fields, text boxes

    Comments
    If you want to force the user to make an entry into this field before saving the record to the database, use the OnBeforePutRecord trigger for that purpose.

    You can use this property together with the InitValue property to make sure an entry is made into this field. The system checks this setting for both the control and field during validation.

    See also MinValue, MaxValue, and Numeric.
  • Options
    HalMdyHalMdy Member Posts: 429
    Don't put the code in the OnValidate trigger, because you are not sure that user always goes throuw the field.

    Put the code in Form trigger OnBeforePutRecord , as recommended in Navision help (type F1 on field property 'Not Blank')...
Sign In or Register to comment.