Using FlexFields with Pre and Post eConnect Stored Procedures

This is an example of using FlexField to change the batch code of a submitted purchase order.  We usually drop the FlexField values into the USRDEFND5 field.

Your first step should be to install the attached Panatrack_ParseData.sql function on your company database to help you parse the data out of our fields.

To see where your specific values are:

  1. Go the PanatrackerGP Portal.
  2. Open the transaction type you want to modify.
  3. Find a successful transaction and click the arrow at the left to expand the row.
  4. Click the “Integration Details” tab. This displays the eConnect that is passed to Dynamics GP.

For this specific example, my USRDEFND5 is:

<USRDEFND5>[Device]1008[/Device][FlexField1]John[/FlexField1][FlexField2][/FlexField2][TrxReceiving.Oid]be7813a8-8876-48de-8d94-772c73108425[/TrxReceiving.Oid]</USRDEFND5>

  1. Find the header for the chunk that has the data in it, in my example the header for this section is taPopRcptHdrInsert
  2. Go to the company database and expand the company database >> Programmability >> Stored Procedures.
  3. Find the taPopRcptHdrInsertPre stored procedure.
  4. Make a backup!

The stored procedure change is attached to make FlexField1 the batch code. (modifiedStoredProc.sql)

Keep in mind, some of these stored procedures are used for multiple transactions, so you’ll want to try to minimize the impact on other transactions.  Although the receiving header is not used in another transaction, I’ve added a check to only cover the Receiving transaction as an example of how to do this.

If you’d actually like to have customized batch codes, contact us at support@panatrack.com to get Version 6.5 which includes configurable batch codes.  No need to change the eConnect stored procedure!

Was this helpful?