Mandatory fields

chamarthi509chamarthi509 Member Posts: 6
Hi all,

I created mandatory fields for the Item table.
I called the function in OnInsert() of table & OnQueryCloseform() trigger

But it is allowing me to create new record even if all the mandatory fields were not given :roll:

Please can anyone help me.

Thanks in advance.

Regards,
Mani

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    That's something which is very difficult to accomplish in NAV. Search the forum for some different approaches: http://lmsmfy.com/?q=mandatory+fields
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • krikikriki Member, Moderator Posts: 9,112
    If you are using NAV2009R2, maybe there is a way, but it might be dangerous:
    Use the OnDatabaseInsert- and OnDatabaseModify-functions in codeunit 1. Put there you controls and you are sure that you intercept all. ALSO inserts/modifies done by programs!!!!!!

    So probably you need to check it if the Description-field is filled in. The insert of T27 is done to save the new key from the numberseries so the numberseries can be freed again for others.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.