Hello:
I am new calling C# methods from Ax 2009.
I created a new method in C#. But, when I put the code
send = new AXV5ElectronicInvoice.Send();
It send the message Object CLRObject could not be created
The C# code is simple:
public class Send
{
public string returnValue;
public void SendDocument(String _User, String _Password, DocumentoElectronico documentoElectronico)
{
String returnValue;
//System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
try
{
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
AXV5ElectronicInvoice.TfhkaPaWebService.Service service = new Service();
EnviarResponse enviarResponse = new EnviarResponse();
enviarResponse = service.Enviar(_User, _Password, documentoElectronico);
returnValue = " ";
//return returnValue;
}
catch(Exception ex)
{
returnValue = "Error";
//return returnValue;
}
}
What could be generate this error?.
How I catch the clrInterop message? I put try catch but the error goes directly to Info class.
Regards!