web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Integration Manager After Document Script Does not Work in GP 11 (2010)

(0) ShareShare
ReportReport
Posted on by 175

My company is moving from GP 9 to GP 11 (2010) and I am testing the existing GP 9 Integration Manager Integrations in GP 11.  I am getting consistent failures in After Document VBScripts.

---------------------------------

The Error is:

ERROR: Error Executing Script 'Document Error' Line 10: - Variable uses an Automation type not supported in VBScript
Variable uses an Automation type not supported in VBScript

---------------------------------

The Script snippet that is causing the error:

  Dim ParentID

  Set ParentID = SourceFields("uFinancialPurchaseHeader.ParentID")

  sSQL = "Update PurchaseHeader set IntegratedStatus = 1 where ParentID = '" & ParentID & "'"

---------------------------------

When I look at the value of ParentID with MsgBox, it looks fine.  It does not seem to allow the sSQL variable assignment with the ParentID.  If I put a constant in the ParentID assignment (Set ParentiD = "123456"), it works fine.  It just doesn't like the existing code.

I think it may have something to do the SourceFields("uFinancialPurchaseHeader.ParentID") being an integer and not a string.  I tried using CStr(), but it threw a different error.

Jim

*This post is locked for comments

I have the same question (0)
  • MG-16101311-0 Profile Picture
    26,225 on at

    Remove the Set statement. Set is only used when declaring objects. Try the following:


    Dim ParentID, sSQL
    ParentID = SourceFields("uFinancialPurchaseHeader.ParentID")
    sSQL = "Update PurchaseHeader set IntegratedStatus = 1 where ParentID = '" & ParentID & "'"


    Hope this helps,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans