how to handle in- and out parameter of type object from an extension method

we have create an extension from a dll. For some methods in the extension the parameters are coming back as type object. I have limited knowledge of working with parameters of type object so I'm struggling with how to create a proper object to pass to the method.

I have created an local variable and did  a cast to an object but then I get the below error. This structure is also generated from the dll and I know this structure has the same attributes as the parameter needs.

I hope someone can point me in the right direction on how to handle parameters of type object in OS.

I also would like to know why OS integration studio is sometimes generating parameters of type object and in other cases it is creating proper structures for the parameters. In below 2 screenshots the highlighted parameters are of the same type in the dll, but in integration studio one comes out as type object and the other comes out as a record of the proper type.


Hello Hille 

Please check the format of the expected value on the dll from that object. Maybe you should call ToObject() from a Record List and not from a Record



Hi Luis, 

Thanks for the quick reply. The parameter in the dll is not a list.

regards, Hille

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.