
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)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,