web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

eConnect voiding a PO - using the pre stored procedure

(0) ShareShare
ReportReport
Posted on by 7,365

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)
  • Suggested answer
    Emily Halvorson Profile Picture
    on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans