Using eConnect with GP Agent
If you plan on using eConnect with GP Agent you will need to follow all Dynamics GP processing requirements in order to maintain data integrity within your Dynamics GP system. eConnect does not do this for you, so you need to do this on your own. You should refer to the Dynamics GP SDK or Microsoft support.mc2software.com for additional information on this topic, but we will give you an overview. You can find the Dynamics GP SDK on the product CD or online at http://msdn.microsoft.com/en-us/dynamics/gp/default.aspx.
When you add transactions into Dynamics GP with eConnect, you must honor the transaction processing requirement normally handled within the Dynamics GP client application. For example, Dynamics GP allows only one user to edit a batch and prevents other users from adding to a batch while it is being posted or edited. Dynamics GP handles this by setting a status column of the row in the Batch Header table (SY00500) to “Batch Receiving” (the table value is 3) and adds a row to the Batch Activity table (SY00800 in the DYNAMICS database). When a user is finished with the batch, the status in the Batch Header is set to “Available” (table value 0) and the row from the Batch Activity table is removed. When you insert transactions into a batch with eConnect, this batch protection is not automatically handled by eConnect, so you must properly manage it yourself. In inserting into the SY00800, you must check for the existence of this record before you use eConnect to add transactions so that you do not add to a batch that is being edited or posted. Here are the steps:
1. Query the SY00800 table to see if there is a record for the Batch Number, Batch Source and Company into which you are going to add transactions. If a record exists, abort your process.
2. Query the SY00500 and make sure the Batch Status column = 0. If not, abort your process.
3. If #1 and #2 pass, insert a row into the SY00800 for the Batch Number, Batch Source and Company into which you are going to add transactions.
4. Update the Batch Status column in the SY00500 to 3.
5. Run your eConnect processes.
6. Set Batch Status column in the SY00500 to 0.
7. Delete the row from the SY00800 that was inserted in #3
Be aware that this requirement exists whether or not you are using GP Agent. If you were only using eConnect and did not follow these precautions, a user could easily go to the Master Post or a Series Post window, mark the batch into which you are inserting transactions, and post that batch, or they could add transactions into that batch through a transaction entry window. Failing to implement these steps will allow your process to add transactions to a batch that is currently being posted, and this will likely cause data corruption.
GP Agent will honor all Dynamics GP batch processing requirements as long as you follow the standards outlined in the Dynamics GP SDK. Before GP Agent attempt to process any batch, it will verify that no other processing or activity in your Dynamics GP system will interfere with the process GP Agent want to complete.