Mexico Electronic Invoice Functionality - error on SignData

Hi everyone - this is almost a mayday call for help.

My customer is still on NAV2009R2. They have the need for the Mexico SAT stamping functionality.

I have brought in all the needed code (Code Units, Tables, Reports, and the MX.SignatureProvider Dll's), all the code compiles.

I imported the certificate provided and added the Thumbprint to the Thumbprint field in NAV.

Unfortunately, the process of requesting the stamp fails with the following message:

This message is for C/AL programmers: The call to member SignData failed : The FileName of the file to be signed is invalid : Parameter Name : OriginalValueFileName

I have no idea how to resolve this issue. Is there anyone who has been successful in implementing this who is willing to help me?

Parents
  • The error comes when calling the MX.SignatureProvider DLL. And it is almost always related to the DLL not being correctly installed. It don't know the exact context of this DLL, nor exactly what is going wrong. But try to reinstall/reregister it again - as administrator. If it compiles then that may not be the problem.

    Are you using classic or RTC client? Is it a client or server side DLL? Is it present on the server, not only your development machine. If only on your machine, then it will compile fine for you, but fail everywhere else.

    You should also try to debug it, maybe the error is visible.

    Maybe the parameter originalValueFileName has not been set before calling it. You would be able to see this, if you use the debugger only from classic client. You can put a breakpoint in the code where it happens, and then check the values of the variables, before calling it.

    If that fails, and if this is standard NAV code, then you can try to make a support request with Microsoft. But being a 9 year old release not supported for years, then I doubt they are able to help you either.

    Nobody ever said using dot.net/dll's would be easy. Which also is why you cannot do that with Business Central (except the new on-prem version).

Reply Children
Related
Recommended