Microsoft Dynamics GP: Analytical Accounting and Integration Manager

One of the downfalls of Dynamics GP Analytical Accounting, is the ability to use existing Integrations through integration manager. There are many articles that contain information on how to update the integration so that AA does not interfere, however, until recently, I have not been able to accomplish this.

One difference is that the integration manager node needs to be the eConnect destination – not the standard destination. You will see that the fields are available for the Transaction Dimension, Transaction Dimension Code, and Dimension Code Amount. When mapping to these fields, however, errors are often encountered.

I was able to narrow down one of the causes of the error message I received. It had to do with the Journal Entry field being set to Use Default. eConnect requires a value to be supplied for the journal entry.

In order to resolve, there are two options. Note the next Journal entry number and populate the data within the source file of the integration, and change the Rule for the Journal Entry Number to Use the Source File. The other option is to add a couple scripts to the Integration. One script will be added to the Before Document event script within the Integration manager properties. The other is to set the field to retrieve that number.

Please find the scripts below – Now you can finally take advantage of uploading Journal Entries with Analytical Accounting Information!

Before Integration Script:

Const adCmdStoredProc = 4
Const adParamInput = 1
Const adParamOutput = 2
Const adParamInputOutput = 3
Const adInteger = 3
Const adVarchar = 200
Const adBoolean = 11
Const adChar = 129
Const adDate = 7
Const adNumeric = 131


Dim SqlStmt
Dim objConnection, objCommand, NextJournal


Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")



objConnection.Open _
   "Provider= SQLOLEDB;Server=MGB001\GP11;Database=TWO; Trusted_Connection=yes;"



With objCommand
.ActiveConnection = objConnection
.CommandType = adCmdStoredProc
.CommandText = "glGetNextJEWrapper" 'our wrapper stored proc

.Parameters.Append .CreateParameter ("@IO_iOUTJournalEntry", adInteger, adParamOutput, 4)
.Parameters.Append .CreateParameter ("@O_iErrorState", adInteger, adParamOutput, 4)

.Execute
NextJournal = objCommand.Parameters("@IO_iOUTJournalEntry").Value
End With

SetVariable "gblJounal", NextJournal

Set objCommand = Nothing
Set objConnection = Nothing



Journal Entry field Script:
CurrentField.Value = GetVariable("gblJournal")

 

This article was written by Kaydee Baker, Practice Manager for Tridea Partners. Tridea is a leading Microsoft Dynamics provider.