Integration Manager Error: Error Executing Script ‘Before Integration’ Line 17: – Object required: ‘gpObj’

Microsoft Dynamics GPOne of Perfect Image’s clients is merging with another organisation and I’ve been onsite a few times to help them configure the new companies and import data. One of the items on my list was to use Integration Manager to import the new chart of accounts. While doing this I used VBA to extend the integration to map between the chart of accounts in the new system to the new format and numbering wanted in Microsoft Dynamics GP.

It was when I came to test the integration with the mapping active that I encountered my problem:

ERROR: Error Executing Script 'Before Integration' Line 17: - Object required: 'gpObj'

Show/Hide Error Message

ERROR: Error Executing Script 'Before Integration' Line 17: - Object required: 'gpObj'
Error Executing Script 'Before Integration' Line 17: - Object required: 'gpObj'
Object required: 'gpObj'
Integration Failed
Integration Results
    0 documents were read from the source query.
    0 documents were attempted:
        0 integrated without warnings.
        0 integrated with warnings.
        0 failed to integrate.

This is the first 18 lines of the Before Integration VBA script; not a sign of gpObj in sight:

'-----------------------------------------------------
' BEFORE INTEGRATION
'-----------------------------------------------------
Dim oCon	'objects
Dim sINTERID	'strings

' Secure a connection against the company database we will be running
' the integration against.

sINTERID = GPConnection.GPConnIntercompanyID

Set oCon = CreateObject("ADODB.Connection")
oCon.ConnectionString = "database=" & sINTERID
'GPConnection.Open(oCon)

' Setup global connection variables
SetVariable "gblConn", oCon
SetVariable "gblInterID", sINTERID

I looked at it for far longer than I should have done in the Integration Manager VB Editor looking for a reference to gpObj before I realised that this must be a reference to the oCon object which was the connection object.

In fact I only realised what the problem was when I copied the text out of Integration Manager Script Editor into Notepad++ and enabled syntax colour-coding for VB and saw that there was one line of code commented out which should not have been:

'GPConnection.Open(oCon)

I removed the apostrophe and was then able to run the integration without any further problems.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.