Issue in INSERT Function - WEB Services (Sales Line)

Ravi_Thakkar
Member Posts: 392
Hello All Experts,
Currently I am working with the Sales Order Sub Form Page Web-Service in Visual Studio .NET (C#).
I am trying to insert a Sales Line in Perticular Sales Order by using the Insert Function of the Same Web Service.
I wrote as follows,
That means, I am unable to locate the Selected Order using this Web-Sevice.
So, is there any sollution?
Currently I am working with the Sales Order Sub Form Page Web-Service in Visual Studio .NET (C#).
I am trying to insert a Sales Line in Perticular Sales Order by using the Insert Function of the Same Web Service.
I wrote as follows,
SalesOrderSubForm_Service Ss2 = new SalesOrderSubForm_Service(); SalesOrderSubForm S2 = new SalesOrderSubForm(); Ss2.Url = "http://spvm:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Page/SalesOrderSubForm"; Ss2.UseDefaultCredentials = true; S2.Document_No = "1020"; S2.Line_No = 10000; Ss2.Create(ref S2);But, through NAV code execution, I found that, it is assigning the Last record of SalesHeader table to SalesHeader record variable and since it is Released Status order, it is showing me the error "Status must be Open in Sales Header".
That means, I am unable to locate the Selected Order using this Web-Sevice.
So, is there any sollution?
0
Answers
-
You should go through the sales order and not directly to the sales order line.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thanks for reply Freddy.
I tried to use as you suggested.
But, I dint find any methods for the Sales Order Line insertion in Sales Order web service.
I found Sales Order Line object, but no methods of it. I can use it only to access the fields of it.
Can you suggest me some example code?
Thanks in Adv.0 -
On the Sales Order there is an array of order lines - you insert or delete in this array and call update on the order (just as you would do in the UI).Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hi Freddy and Ravi,
Thanks for the discussion on this topic...
I got your point freddy, i tried also to insert a new line but was not successful..
Can you please point out the exact method.
Thanks in Adv.0 -
Hello Freddy,
Thanks for your reply and suggestion.
It really insertion of new line worked nicely. Deletion is under testing.
=D> =D> =D>
Thanks again.0 -
Hello Freddy,
I tried for the DELETION of Sales Line by using array and then update function of Sales Order web service. But, unable to do the same.
Can you please suggest in some detail?
Since this post is related to INSERTION issues, provide me the suggestion on following link for DELETION issues :
http://mibuso.com/forum/viewtopic.php?f=32&t=34250&sid=cab5d23f62f81fe3af443c09e0132235
Thanks in Adv.0 -
I thought this topic was too large to describe here - AND the fact that SP1 changes some things - I have created a description on how to work with Sales Orders through page based web services on my blog:
http://blogs.msdn.com/freddyk/archive/2 ... d-rtm.aspx
Hope that helpsFreddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thanks Freedy.
I will go through your blog on specified link.
Thanks for help.0 -
Thanks all.
Problem solved.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions