In a .NET activity, a method returns object. However, this cannot be mapped to a dynamic complex variable in KTA.
KTA does not support mapping a dynamic complex variable to an object in a .NET activity.
In the .NET code, the object can be returned as object using the below line of code.
return objectArray as object;
A dynamic complex variable can then be mapped to the simple object and returned to KTA.
Level of Complexity
A bug exists in v7.6 and v7.7 that allows for a dynamic complex to be mapped to an object in the Designer.
Bug 1356128:Should not be able to map dynamic complex to a object type in a .NET activity