Acumatica SOAP API release payment status error -
i'm working on releasing acumatica payment via soap api documented on page 117 of i210 contract based web services guide here. have implemented code manual spec when release payment i'm getting error:
tx error #3: document status invalid processing. @ px.objects.ar.arpaymententry.release
when @ status of newly created payment, has status balanced believe should able released. there status payment needs in order released?
my code:
//creates order attach payment salesorder neworder = (salesorder)await client.putasync(ordertobecreated); var woopaymentref = "test"; //create payment order payment paymenttobecreated = new payment() { type = new stringvalue { value = "prepayment" }, status = new stringvalue { value = "open" }, paymentmethod = new stringvalue { value = store.acumaticapaymentmethod }, paymentamount = new decimalvalue { value = convert.todecimal(wooorder.order.total) }, customerid = neworder.customerid, orderstoapply = new paymentorder[] { new paymentorder() { ordertype = new stringvalue { value = "so"}, ordernbr = neworder.ordernbr, appliedtoorder = neworder.ordertotal } }, cashaccount = new stringvalue { value = store.acumaticapaymentmethod }, paymentref = new stringvalue { value = woopaymentref }, hold = new booleanvalue { value = false} }; payment newpayment = (payment)await client.putasync(paymenttobecreated); //extra step newly created payment make sure it's recent payment paymenttobefound = new payment { type = new stringsearch { value = newpayment.type.value }, referencenbr = new stringsearch { value = newpayment.referencenbr.value } }; payment currentpayment = (payment)await client.getasync(paymenttobefound); //release payment invokeresult invokeresult = await client.invokeasync(currentpayment, new releasepayment()); //monitor process processresult processresult = await longprocessrunner.getprocessresult(client, invokeresult);
the error occurs @ invokeresult line.
there nothing wrong code wrote.
i asked in comment version asking since in newer version not able reproduce issue. version february 2017, did found issue report mentioning problem had been fixed. though version superior 5.30.3715 or 6.10.0680 around june 2017 .
if try code in these version or newer should work.
Comments
Post a Comment