VBScript "Type Mismatch" Error with Integration Manager 10.0

For those of you battling it out with a "Type Mismatch" error in your event or field scripts upgraded to IM 10.0 from previous releases of IM, sweat it no more! This issue has been recognized as a bug by Microsoft and was unfortunately not resolved in Feature Pack 1 (or Service Pack 2). The problem seems to occur with all IM VBScript functions that accept parameters.

"The issue is that these functions (and many other) accepted OPTIONAL parameters in prior versions of IM. The reason these are now failing is because Integration Manager has been switched over from VB6 to C# .Net code. The problem with that is that C# does not support optional parameters. That means that those existing function's "Optional" parameters are now actually Required parameters." said Greg Willson with Microsoft in the Microsoft Dynamics GP Community group.

However, as a workaround, IM developers must supply all parameters for the affected functions until a Hot Fix is made available in July. Willson proceed to explain the issue with an example.

"So with that said, the LogDocDetail function has five parameters (message, source, status_code, field_name and field_value). All parameters are string values except "status_code" which is an Integer value. So, now that we know that, if you supply a value for all parameters, it will work as expected.".

The list of affected functions include (but may not be limited to):

  • CancelDocument [message, source, status_code, field_name, field_value]
  • CancelIntegration [message, source, status_code]
  • Execute path [, timeout] [, window_style]
  • LogDetail [message, source, status_code]
  • LogDocDetail [message, source, status_code, field_name, field_value]
  • LogDocWarning [message, source, status_code, field_name, field_value]
  • LogWarning [message, source, status_code]
  • PlaySound path

Functions not affected:

  • ClearVariables
  • DocumentIsNew
  • DocumentNo
  • GetVariable(variable) -- the parameter is mandatory
  • SetVariable variable, value -- the parameters are mandatory
To access and contribute to the discussion thread on the Microsoft Dynamics GP community click here.

Until next post!

Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC


Unknown said…
Hi there! I am getting this message in IM v9. I am using Auto Dim which works similar to a login macro to open Dynamics GP and then Integration Manager. I am getting this error after GP opens, just as Integration Manager is called. This is "breaking" the macro and hanging up the integration. What do I change in the integration to avoid this error? You can email me at katiebley@gmail.com. Thank you!


Popular posts from this blog

Power Apps - Application Monitoring with Azure Application Insights

DBMS: 12 Microsoft Dynamics GP: 0 error when updating to Microsoft Dynamics GP 2013 R2

eConnect Integration Service for Microsoft Dynamics GP 2010