Hi Im having problems with Microsoft Dynamics NAV 2009 R2 Web Service!
There is a webMethod given called OrderGoodsInsert which needs parameters lLanguageId [int], lRec [Text 250] [100]
lRec should be a string array with values such as these
Using c# code I try to call the method that is added as a web service reference to my project. The code:
string[] arr = new string[8];
arr[0] = "1";
arr[1] = currentDocNo;
arr[3] = "SU04";
arr[5] = "2";
arr[6] = item.Code;
arr[7] = item.Amount;
arr[2] = "";
arr[4] = "";
navWS.OrderGoodsInsert(1062, arr);
But when I do I get
A first chance exception of type 'System.Net.WebException'
occurred in System.dll
A first chance exception of type 'System.Web.Services.Protocols.SoapException'
occurred in System.Web.Services.dll
The error is that index out of bounds
Am I doing something wrong?
The problem was that the developer of the WS made changes and did not send out a new documentation. One more string was needed in the array which represented the shelf the item is on.