Extending the Default eConnect Business Logic with 'Pre' and 'Post' Stored Procedures
This is fourth in a series of articles covering eConnect for Microsoft Dynamics® GP. Part 1 explained that the business logic for eConnect exists in stored procedures within the Dynamics GP company database. Part 2 created an eConnect integration utilizing the .NET APIs within Visual Studio. Part 3 examined using eConnect directly from a SQL stored procedure.
From the last posts we have shown examples of utilizing the business logic built into the eConnect stored procedures. In this post we will examine ways to add-to or modify the existing business logic. Direct modifications to existing stored procedures is never advised as any patch or update of Dynamics GP could overwrite these modifications.
To allow for modifications, each eConnect stored procedure has a corresponding "Pre" and "Post" stored procedure which executes before and after the main procedure accordingly. The same parameters that are passed to the main stored procedure are also passed to the pre and post procedure as well.
For our example today we will examine utilizing this modification ability by using a real-life situation with an existing client who was already using the built in Dynamics GP Sales Order Processing (SOP) capability to override an account segment based on the inventory location. In addition to using the inventory segment, the client wanted to override a different account segment based on the document ID of the SOP Order transaction. Because these documents would integrate as Orders, they would not contain a GL distribution. Only SOP Invoices and Returns have general ledger account distributions, but because of workflow, the client needed each Order line to ...
FREE Membership Required to View Full Content:
Joining MSDynamicsWorld.com gives you free, unlimited access to news, analysis, white papers, case studies, product brochures, and more. You can also receive periodic email newsletters with the latest relevant articles and content updates.
Learn more about us here