DOTNET object -> RunOnClient:Yes

Hi everyone,

After different upgrade for different customers, I’ve found an issue that makes me a little mess. I’ll try to explain myself, and I hope you’ll give me your thoughts.
Everything has to see with the development of the “Electronic VAT Information under SII”, but I think that happens with every development with DOTNET objects.
I’ve made an upgrade for one customer to the NAV2017, and the development works perfectly, without changing any property of the DOTNET variables.
But instead, with another upgrade from other different client, doesn’t happen the same.
In this case, I’m doing an upgrade to the NAV2018 version. When I try to run a development with DOTNET objects, I’m finding the error: “Cannot serialize DOTNET object”. For one integration I’ve developed with external WebServices, I’ve solved this issue changing the RunOnClient property to “Yes”, and I think that this issue, for the “Electronic VAT Information under SII”, could be solved in the same way.
The thing is that I don’t understand why this development run without changing anything in one server, and in this new one, I’m finding this issue.
Could be because of something in the server? Or the NAV installation? Any thoughts?

Thnak you all

Hi Aitor,

Are you using a modified (or your own) version of SII in NAV 2018?

We have implemented some NAV 2018 with our modified version of SII, and works with no problems.

This error can ocurr when you use a DotNet var and you pass it as a function parameter, and both (var and parameter) have different values in RunOnClient. Check this, and verify than both have same values in RunOnClient (normaly FALSE).

Hola Ponç,

No, I’m using the default version of the SII. But it’s true, that I’ve changed all the variables from the 6224 CodeUnit to RunOnCLient=YES, because of another own CodeUnit from another integration with WebServices.

This own CodeUnit has come from the 2013r2 version, and in that version the runOnClient was changed to Yes. That’s why I’ve changed the 6224 CodeUnit. Trying to understand what you’ve said, probably the error is here, that the RunOnClient property doesn’t have the same value in all the involved objects.

Should I try to change everything to RunOnClient=No?

Thanks for your hint, appreciated

Hola Aitor,

Yes, it will be better change everything to RunOnClient=No. This way, you only need to install (if necessary) DotNet components in one computer (server) and will work on every client… of course, can exist some exeptions (but is not the case with XML DotNet vars) that require RunOnClient=True. I think that if DotNet var RunOnClient is defined as Yes, you can only use it in Windows Client (it doesn’t work in web client nor phone/tablet client), but I’m not shure.

Gracias Ponç,

Now, will I was waiting for your answer, I had changed all the RunOnClient to “Yes”, and at least, I don’t have the serializing problem. I have a communication error, but that’s another issue., probably something about the SII configuration.

I’m going to change all the properties to “No”, and try if it works at least in the same way.

Thank you!

Hi Aitor,

Please click on the “Verify Answer” for the replies which helped you solved you problem. Thank you.