Application Uses a Value of the Wrong Type for the Current Operation error on SOP transaction Integration

TechKnowledge Content


While running a Sales Order Processing transaction with Integration Manager using the SQL Optimized provider, the error message 'Application uses a value of the wrong type for the current operation' appears randomly during the integration. Why is this error occurring and how can it be resolved?


The Contact field within Dynamics/eEnterprise has a keyable length of 31 characters. Within the Integration Manager SQL Optimized adapter the keyable length is specified as 64. When a value within the source file contains over 31 characters for the contact field, Integration Manager is unable to truncate as it has the contact field defined as 64 characters, and the error occurs.

A work around for this situation is to use a VB script at the contact field event that trims the values from the source file to 31 characters.
Currentfield=Left(Sourcefields("Query Name.Column Name"), 31)

This article was TechKnowledge Document ID: 22654


Microsoft Dynamics GP 9.0

Microsoft Business Solutions–Great Plains 8.0

Microsoft Business Solutions–Great Plains 7.5

Microsoft Great Plains Dynamics 7.0

Microsoft Great Plains eEnterprise 7.0

Great Plains Dynamics 6.0

Great Plains eEnterprise 6.0

Integration Manager

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.