Tuesday, July 3, 2018

Using eConnect from Dexterity - Part 2

In Part 1 I introduced my reasons for using eConnect in Dexterity customizations of GP, and recommended installation of the eConnect SDK so you could obtain the (CHM) Programmer's Guide, which will be helpful in writing eConnect integrations.

Now I will introduce my basic framework for integrating the two technologies.

First, understand that, among other things, eConnect includes a bunch of stored procedures that are installed in every Dynamics GP database.
The Programmer's Guide will help identify which of these procedures you'll need.  When you figure out which you'll be using you can use SQL Management Studio to view the parameters you'll need to feed.
The above example shows the parameters needed to pass to the taGetNextJournalEntry eConnect procedure.  If you want to create Journal Entries in GP you can use this stored procedure to get the next number.  Oddly these "Next Number" stored procedures are not in the documentation.

You can reference these procedures directly from Dexterity, but I like to wrap them in my own stored procedures and call mine instead.
Notice the reference to taErrorCode in the Dynamics database.  Because I only want the next JE number I also take back any error information.  I follow this structure for all my eConnect procedure calls.  This makes the Dexterity call fairly simple:

Next time I will look at a transaction example.

No comments:

Post a Comment