7Hi guys,
I was trying to call the dll from dynamics ax to pass string array value and processing it. Please find the below code inside the dll, when I was calling from dynamics ax I am getting error (Clr Interop Marshal: Unsupported type) in last line of the below code (SOAP client).If I remove the last line system works fine
ResponseItemMaster resItem = new ResponseItemMaster();
ItemMaster itemMaster = new ItemMaster();
ItemsHospital hospital = new ItemsHospital();
ItemsHospitalItem hospitalItem = new ItemsHospitalItem();
MasterSettingClient client = new MasterSettingClient();
Please find the below x++ code.
SCMServiceIntegration.Class1 scmServiceIntegration = new SCMServiceIntegration.Class1();
System.String[] itemMaster = new System.String[7]();
InteropPermission permission = new InteropPermission(InteropKind::DllInterop);
;
permission.assert();
try
{
itemmaster.SetValue("test2",0);
itemMaster.SetValue("test1Description",1);
itemMaster.SetValue("TAB",2);
itemMaster.SetValue("testName",3);
itemMaster.SetValue("add",4);
itemMaster.SetValue("31080001",5);
itemMaster.SetValue("DA01",6);
info(CLRInterop::getAnyTypeForObject(scmServiceIntegration.createItem(itemMaster)));
}
catch(Exception::CLRError)
{
info(CLRInterop::getLastException());
}
CodeAccessPermission::revertAssert();
Please guide me to resolve this.
*This post is locked for comments
I have the same question (0)