Hello,
I've created a dll which is a wcf wrapper, and a function in this dll which returns an custom object defined in this dll also.
Its NAV 2016, code looks like:
MyWrapper := MyWrapper.Wrapper();
ReturnedObject := MyWraper.Function(parameters);
My problem is that ReturnedObject and its properties remain uninitialised after the function call, what breaks further code flow.
Earlier int the code i call other function from wrapper which returns string - that works completely fine.
Is there a way to retrieve custom objects like this?
Returned object class has attribute
Serializable
but this does not help.
Thanks for any suggestions!
Comments
ReturnedObject must be of exact same type as the return value of fct. MyWraper.Function(parameters).
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
Initialize it: MyObject := MyObject.MyObject();
Fill the MyObject with the return.
MyObject := Function(parameter);
No need for sterilization.
RunOnClient, only if, well it should.... Normally not, as all business logic runs on service tier.
Thanks a lot!