mk3000 6/30/2016 4:47:08 PM

eConnect Method to Close Purchase Orders

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);
        }

Version: All, GP 2013
Section: .NET Development, Dynamics GP, eConnect, Visual Studio Tools for Dynamics GP, Web Services


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3