Differences between field and control

sridharsridhar Member Posts: 171
When we have to code in Onvalidate() of a control (Textbox)and when we have to code in Onvalidate() of field?

N.Sridhar

Comments

  • charlpcharlp Member Posts: 21
    I prefer to use the OnValidate at field level on the table, otherwise you will have to duplicate your validation code on each form you might create that makes use of the table.
  • kinekine Member Posts: 12,562
    On form only if you need some specific checking which is specific for the form... else on table...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,307
    There is one simple rule you should follow:
    Data operations should always be programmed in the table.
    Display operations should always be programmed on the form.

    So if you need to change a color depending on the value of a field, you do it on the form. If you need to default address information depending on the customer number, you do it in the table.
Sign In or Register to comment.