Hello,
I am trying to update statuses for old purchase order documents en masse. The web service call works fine when cancelling PO lines which are New, Released, or Change Order. However, when trying to push a status of Closed to PO lines with the status of Received, the call does not work. eConnect does not throw any errors at this point, it is like the call is being ignored. Below I have pasted the entire web method, and any help/insight is appreciated!
[WebMethod]
public void changePOLineStatusSTG(string PONumber, string Vendor, string ItemNumber, int LineSeq, int POStatus)
{
eConnectType eC;
POPTransactionType po = new POPTransactionType
{
taPoLine_Items = new[]
{
new taPoLine_ItemsTaPoLine {
PONUMBER = PONumber,
POLNESTA = (short)POStatus,
POLNESTASpecified = true,
VENDORID = Vendor,
ITEMNMBR = ItemNumber,
ORD = LineSeq,
ORDSpecified =true,
UpdateIfExists = 1
}
},
taPoHdr = new taPoHdr
{
PONUMBER = PONumber,
VENDORID = Vendor,
UpdateIfExists = 1
}
};
eC = new eConnectType { POPTransactionType = new[] { po } };
SendEconnect(eC, Settings.Default.CS_STG, TrxType.UPDATE);
}