Validate record's manual inserted?

Heloo,

Am use nav 2009 r2

I hav inserted manual some record in Sales Header and Sales Line, I use SQL.

How I can make it validate for the rows inserted, or a testfield?

I need to insert some values in another table?

For calling validate / testfield you need to insert it from NAV.

I would not recommend to insert anything from outside NAV at least on standard tables.
The Business logic cannot be executed when you insert from SQL.
If you need to insert from outside then use webservices, they will let you execute Business logic.

Tanks for answer. In fact a have two nav tables, I need to copy some records from database1. SalesHader in database2.SalesHeader, an SalesLine for both tables. I have copy the data, and I want to validate the record. Tel me if this is corect, when I create a SalesOrder form page SalesOrder, I inser data in table SalesHader and SalesLine?
With my data copy in database2, when I run the sales order in RTC, the data is ther and I can create a post. Sorry for my English.

Don’t ever do this otherwise it will turn out to be a nightmare to you when you will start executing your core business from NAV - an ERP.

If you will go and open Table 36 and press F9 you will see a collection a codes over there which gets executes when you create an order and all needed validations are crosschecked.

In your case I believe and as Saurabh suggested you should go with Web Services.

Hello, tanks for the answer . Can you suggest starting point, some code example how to insert a Sales Order via web services. I 'am very new to NAV.

Have you done C/AL coding before? If not you might take help from your ERP partner. The forum can help you with correcting code but not writing code for you. Hope this helps.

I have created a codunit with a function:PostOrder with a local variable:Order, type:Record, sybType: SalesHeader

in my function i have the code:

Order.Ship := TRUE;

CODUNIT.RUN(CODUNIT::“Sales-Post”, Order);

And in FORM 810-WEB SERVICES i add 2 services, one for my codeunui, and one for tha table Sales Header,

I try to access the web service:

localhost:7046/DynamicsNav/WS/CRONUS International Ltd/Page/Order

i get an error, somtin about impersonate.

Is ok haw i createad the webservice?

Wy i get the impersonate error, i-am nat in a domaine, nav server, sql server and rtc are on the same machine.

you can use dataport…
but firstly, you need to set the columns in dataport
you can take the ref as below:
community.dynamics.com/…/16125

Best is using dataport.Before that u can copy all your sales header & line as two .csv file then u can import ur sales order header & line .