private void button1_Click(object sender, EventArgs e) { NavWSAchat.WSAchat_Service service = new NavWSAchat.WSAchat_Service(); service.UseDefaultCredentials = true; //service.Url = "http://localhost:7047/DynamicsNAV/WS/Page/WSAchat"; NavWSAchat.WSAchat achat = new NavWSAchat.WSAchat(); //creation du filtre List<NavWSAchat.WSAchat_Filter> filterList = new List<NavWSAchat.WSAchat_Filter>(); NavWSAchat.WSAchat_Filter noFilter = new NavWSAchat.WSAchat_Filter(); noFilter.Field = NavWSAchat.WSAchat_Fields.No; noFilter.Criteria = RechercheTextBox.Text; filterList.Add(noFilter); NavWSAchat.WSAchat[] AchatList = service.ReadMultiple(filterList.ToArray(), null, 100); DataTable dt = CreateAchatTable(); DataRow row; foreach (NavWSAchat.WSAchat achatItem in AchatList) { //Création de DataTable et DataRow row = dt.NewRow(); row["No"] = achatItem.No; row["Status"] = achatItem.Status; row["Responsibility_Center"] = achatItem.Responsibility_Center; dt.Rows.Add(row); }
NavWSAchat.WSAchat[] AchatList = service.ReadMultiple(filterList.ToArray(), null, 100);I got an error : You must define Path Property before calling Send Method
service.Url = "http://localhost:7047/DynamicsNAV/WS/Page/WSAchat";I got an error : The supplied Company Name is not valid
service.Url = "http://localhost:7047/DynamicsNAV/WS/CRONUS_FRANCE_S_A/Page/WSAchat";I got an error : The supplied Company Name is not valid
Answers
(then I can mangle the name for you)
Else there is a function called Companies which can found in the SystemService:
http://localhost:7047/DynamicsNAV/WS/SystemService
In that one you should get a list of the companies using the following code:
But.... - I just found out that you need to have the company in the path to call that function too - I see that as a bug.
So - what is the name of french Cronus?
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.
I'll try your piece of code tomorrow.
thx for the reply.
Yann
Cronus_France_S_A
should be right - if CRONUS indeed isn't capitalized.
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.
Effectively, it is case sensitive... and it was my problem.
thanks a lot
Yann
I have exactly the same problem as you with the company "CRONUS France S.A.". Did you find the correct writing for the URL ?
I'm trying to add web reference in visual studio 2008 but i can't.
Thank you for your help.