I'm having a pretty hard time finding documentation on Lists and Arrays in Arden MLM.
I am trying to pass a list of 4 digit numbers from Arden using ObjectsPlus to a C# DLL that can take that list as an argument and do what the function is designed for.
Here is what I have in Arden MLM but does not work as I get the .net error "Object reference not set to an instance of an object"
Here is the MLM:
list_id_object := OBJECT [id_list_holder];
id_list := new list_id_object with "1154", "1155", "1158";
try
send_alert_start := new net_object 'Webservices';
result := call send_alert_start.'pageToMultipleIds' with
((sender_name as string) as 'String'),
((sender_message as string) as 'String'),
((list_id_object as list) as 'List<Int32>');
endtry;
catch Exception ex
error_occured := true;
error_message := "Error message here\n" || ex.Message || "\n\n";
endcatch;
And here is the C# method that receives that list:
public string testMethod(string sender_name, string sender_message, List<Int32> IdToPage)
{
try
{
testMethod2(sender_name, sender_message, IdToPage);
return "Success";
}
catch(WebException e)
{
return e.ToString();
}
}
This is written for Allscripts SCM but it should show how to build a List. Unfortunately you have to create a standard Arden list and then loop through it and add each item to the List.