# Validate function

**URL:** <https://www.dynamicsuser.net/t/validate-function/61740>\
**Category:** User Forum\
**Created:** [October 10, 2016, 8:03am UTC](https://www.dynamicsuser.net/t/validate-function/61740 "2016-10-10T08:03:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohit\_vashishtha](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@mohit\_vashishtha](https://www.dynamicsuser.net/u/mohit_vashishtha)\
**Post date:** [October 10, 2016, 8:03am UTC](https://www.dynamicsuser.net/t/validate-function/61740/1 "2016-10-10T08:03:34Z")

</div>

Dear sir  
i am new in navision. please tell me about working of validate function in navision.

---

<div class="post-metadata">

**Author:** ![mohana\_cse06](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mohana\_cse06](https://www.dynamicsuser.net/u/mohana_cse06)\
**Post date:** [October 10, 2016, 8:22am UTC](https://www.dynamicsuser.net/t/validate-function/61740/2 "2016-10-10T08:22:21Z")

</div>

[msdn.microsoft.com/…/dd338618.aspx](https://msdn.microsoft.com/en-us/library/dd338618.aspx)  
[navisionworld.blogspot.in/…/testfield-validate-functions.html](http://navisionworld.blogspot.in/2009/07/testfield-validate-functions.html)  
VALIDATE calls the OnValidate trigger of a field.

---

<div class="post-metadata">

**Author:** ![ishwar.sharma](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@ishwar.sharma](https://www.dynamicsuser.net/u/ishwar.sharma)\
**Post date:** [October 10, 2016, 12:16pm UTC](https://www.dynamicsuser.net/t/validate-function/61740/3 "2016-10-10T12:16:53Z")

</div>

Validate is used when you want to assign a value to a field which exists in a table and also you want to execute the code which is there in this field’s OnValidate() trigger.

For eg: I want to change the value of Type & No. field in a Sales Line, My code might be like,

IF SalesLine.GET(“Document Type” , “Document No.” , “Line No.”) THEN BEGIN  
SalesLine.VALIDATE(Type , SalesLine.Type::Item);  
SalesLine.VALIDATE(“No.” , ‘ABC001’);  
SalesLine.MODIFY;  
END;

This code will change the values of Type and No. field to Item & ABC001 respectively. And it will also execute the code written in OnValidate triggers of these to fields.

And I would suggest you to read the ADG and NAV technical pdf’s to start learning from beginner level in NAV.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![amol\_salvi](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@amol\_salvi](https://www.dynamicsuser.net/u/amol_salvi)\
**Post date:** [October 10, 2016, 5:10pm UTC](https://www.dynamicsuser.net/t/validate-function/61740/4 "2016-10-10T17:10:20Z")

</div>

Hi  
You can look at this link to understand

[msdn.microsoft.com/…/dd338618.aspx](https://msdn.microsoft.com/en-us/library/dd338618.aspx)
