
I am using the taPoVoid eConnect Node to void Purchase Orders that are being created and synched up from another system. Sometimes there are cases where a PO is not yet created in GP (briefly, because a GP vendor ID has not been assigned to this other system at that point, so we can't create the PO yet) But if they need to cancel the other in this feeder system immediately, and the PO does not exist yet in GP, we get the message "The Order Status must be new......" I was hoping to get a "This PO Does not Exist"
What I want to do is to put a script in the Pre stored procedure to check if the PO exists. But my question is, if the PO does not exist, can I put some code in there like in VB where I might do "Exit Sub." meaning don't even bother going into the real taPoVoid, because I already know the result.
What I am trying to accomplish is to have it really give the the error about "The PO must be new...." when there is a PO and it is not new. But if it doesn't exist at all, I want to be able to let my .net code continue on and allow them to cancel the order in the feeder system. Currently, this message makes it so they can't save the order status. Hope this makes sense.
*This post is locked for comments
I have the same question (0)Hello,
If your return value from the pre script is set to something other than 0 (zero), the taPopPoVoid call will abort. This will then go through the normal eConnect error handling process - finding the error code returned in the DYNAMICS..taErrorCode table and report in Event Viewer with the taErrorCode.ErrorDesc, etc.