Required Field Validation

arunjan387arunjan387 Member Posts: 32
Hello everyone,

I have a doubt on How to use the Required Field Validation for controls in Microsoft NAV 2009? Can some one help me on this question?
Thank you
Regards
B. ARUN
Senior Software Engineer
Coimbatore, Tamilnadu, India.
Phone: +919994947514 | email: arun.3187@gmail.com | Skype: arun3187

Comments

  • SavatageSavatage Member Posts: 7,142
    do you have specific question about what you are doing, what you have tried & what isn't working?

    Or are you asking What is validation?
  • arunjan387arunjan387 Member Posts: 32
    Hello,

    I would like a make a particular field as Mandatory in Forms. If a user tries to post a transaction without entering the Mandatory field, the application should display an error message. Can you help me on this?
    Thank you
    Regards
    B. ARUN
    Senior Software Engineer
    Coimbatore, Tamilnadu, India.
    Phone: +919994947514 | email: arun.3187@gmail.com | Skype: arun3187
  • vijay_gvijay_g Member Posts: 884
    Search for TESTFIELD function in C/SIDE Reference Guide.
  • imclever1205imclever1205 Member Posts: 94
    You can also make use of an IF statement and make it display an error message.
  • arunjan387arunjan387 Member Posts: 32
    Thanks for reply,

    I tried your suggestions but it did not work out.

    Let me explain the case. I need to make the state code in the vendor master as mandatory. If a user create a vendor record without the "State Code", the application should display an error. Can you help me on this?
    Thank you
    Regards
    B. ARUN
    Senior Software Engineer
    Coimbatore, Tamilnadu, India.
    Phone: +919994947514 | email: arun.3187@gmail.com | Skype: arun3187
  • vijay_gvijay_g Member Posts: 884
    Check how does "Vendor Invoice No." work when posting Purchase Invoice.
    If you have check "Ext. Doc. No. Mandatory" in purchase setup then it will prompt error to fill this field.
  • SavatageSavatage Member Posts: 7,142
    try the suggestion posted here:
    viewtopic.php?f=32&t=44971
    Savatage wrote:
    Basically the steps are Oninsert the field "blocked" is set to TRUE!

    Onvalidate of the blocked field (when the person goes to UNCHECK it to make it active)
    it then checks the fields you want to have mandatory using a simple testfield code.
    Basically in the on validate trigger of the "blocked" field you add code like
    Testfield('My Field 1");
    Testfield('My Field 2");
    Testfield('My Field 3");
     etc.
    

    This way when you try to unblock the vendor you won't be able to till you fill in the missing fields.
Sign In or Register to comment.