Greetings,
The below mentioned code is throwing an exception."SmartObject property Role_Name is a required property for selected method Get_Role_Users. Value must be set"
Is this the right way to pass the parameter value to the SmartObject method ?
SmartObject employee = serverName.GetSmartObject("UMUser");
employee.MethodToExecute = "Get_Role_Users";
employee.Properties[0].Value = "Preparer";
SmartObjectList employees = serverName.ExecuteList(employee);
foreach (SmartObject so in employees.SmartObjectsList)
{
string bar = so.Properties["Name"].Value.ToString().Trim();
Console.WriteLine(bar);
}
If I mention the property name as; exception is thrown as"Key could not be found in the collection ! "
employee.Properties["Role_Name"].Value = "Preparer";
Can anyone let me know how to pass parameter to the smartObject? When I execute the same method through "SmartObject Service Tester.exe", it works fine.
Thanks,
Aman