Readmultiple fail in Purchase Order Page Web Service

amphysvenaamphysvena Member Posts: 113
edited 2014-10-02 in NAV Three Tier
Hi,
I published Page 50 - Purchase Order as Web Service in NAV 2013 R2.
After that, I consume that webservice in my .NET 2012 winform. My code is like this :

wsPO.PO clsPO = new wsPO.PO();
wsPO.PO_Service svcPO = new wsPO.PO_Service();

svcPO.UseDefaultCredentials = true;

List<wsPO.PO_Filter> lstFilter = new List<wsPO.PO_Filter>();

wsPO.PO_Filter filter = new wsPO.PO_Filter();
filter.Field = wsPO.PO_Fields.No;
filter.Criteria = "TEST0013";
lstFilter.Add(filter);

wsPO.PO[] arrPO = svcPO.ReadMultiple(lstFilter.ToArray(), "", 0);

foreach (wsPO.PO p in arrPO)
{
MessageBox.Show(p.Buy_from_Vendor_Name);
}

The problem is, the ReadMultiple doen't work, and I'm sure the document no. is exist. The Read method is also fail, because the parameter in Read method only shows 1 parameter (Document_No string) and it always return Null.

Do i miss something? The code above is work on 1 key table, like Customer, Item Ledger Entry, Item.

Thanks

Answers

  • amphysvenaamphysvena Member Posts: 113
    Never mind, finally fix the problem
  • krikikriki Member, Moderator Posts: 9,112
    You could post what you did to fix. It might help others.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • amphysvenaamphysvena Member Posts: 113
    Somehow my webservice are broken. I mean they shows the wrong key, and update the web reference does not help. So i just delete the web service and add it again.
Sign In or Register to comment.