Hi all,
I'm upgrading some automations to DOTNET for use in NAV 2015 / 2013R1, and in that process I'm stuck on this challenge;
I've made a class library in VS with a web-service reference, everything works smoothly in NAV 2015, and the code was so much cleaner than before
I was happy...
Then I copied the objects to a client 2013R1 install, and no longer would it compile. I got the "Reduce the expression" sigh...
I was not so happy, as I can't reduce the expression myself.
The method which I call from the .DLL is named checkVatApprox and has more than 20 variables... I googled around, and there seems to be some limit in C/AL.
pRequestDate := VatCheck.checkVatApprox(pCountryCode,pVATNo,pTraderName,TraderCompanyType,TraderStreet,TraderPostCode,TraderCity,pRequesterCountryCode,pRequesterVatNumber,
pValid,pTraderAddress,dotnetx,lTempBool,dotnetx,lTempBool,dotnetx,lTempBool,dotnetx,lTempBool,dotnetx,lTempBool,pConsultationNumber);
This limit seems gone in 2015, but still there in 2013R1
I guess the only way I can get around is to make some more DOTNET coding, I see where this is going,..less and less C/AL, more DOTNET !
Any other smart ideas?
Comments
2013prepareapproxVAT(first set of parameters, no by reference vars);
2013approxVAT(the rest including your return vars);
To link these I would give a unique (like GUID) identifier.
with best regards
Jens
Thanks for tip, now I now what I need to start googling on and learning today.
DLL Wrapper - sounds awesome
For the input, I need only 4 variables.
For the output, I need only like 5 of the ref variables.
Hi
Try Build 7.0.36919 or newer
-358991 Call to dotNET method doesn't allow to use more than 20 parameters but requires 30
Bye
Matteo