Web services in Dynamics NAV

Hello,

Please help me. I’d like to create a new sales line in an order that i create it with web services.

I wrote this code:


Dim service As line.ligne_Service = New line.ligne_Service

service.UseDefaultCredentials = True

service.Url = “”>localhost:7047/…/ligne"

Dim ligne As line.ligne = New line.ligne

ligne.Document_Type = 1

ligne.Document_No = “2018”

ligne.No = “1000”

service.Create(ligne)


When i run it , this error is showen:

“You cannot rename a Sales Line”

Can anyone help me please an thanks in advance…

can you be clear what do you want?

you want to call vb.Net webservice from Axapta?

or

you want to run webservice directly to insert into axapta table?

what do you want do with webservice?

Regards,

Britto John Baskar.A

In fact,

i had published the sales line table and i get the URL. Now i’d like to insert a sales line in this table with a code in VB.NET.

In my code i create a new order with web services (also i had published the sales header table) an after that i’d like to insert new sales line in this order but when i try to insert this error was occured:

"You cannot rename a Sales Line"

Can you help me please and thanks in advance…

Hi,

Did you ever get an answer to your question. I have the same problem.

Thanks

Ed,

Is your problem the same, or is your problem inside Dynamics NAV?

The error comes if you instead of inserting a new record make changes to the primary key fields of the sales line.