Skip to main content
Kofax

Kofax TotalAgility - Mapping a dynamic complex to an object[][] in a .NET activity

dynamic complex variable cannot be mapped to a object[][] .NET code

Applies to

  • KTA 7.5
  • KTA 7.6
  • KTA 7.7

Scenario

Attempting to map a dynamic complex variable to an object[][] in a .NET activity does not work.

Solution

Kofax TotalAgility does not support mapping a dynamic complex variable to an object[][] in .NET code. 

A bug does exist in KTA v7.6 that allows us to incorrectly perform this mapping.  See bug 1356128.  However, this will cause the following error at runtime: No parameterless constructor defined for this object

Instead we should map a dynamic complex to a simple object in .NET.  This can then be converted to an object[][] using the following line of code: object[][] objArray1 = simpleObjectFiledName as object[][];

There is a known bug in v7.6 where we cannot map a dynamic complex to a simple object in .NET.  See bug 1320982