Announcements
Hi to all!
Project requirements: create a cwa with string input and List output.
But the values that can be used are Bool, DateTime,Decimal,Double,Money,EntityReference,OptionSetValue and string. List no. Suggestions?
Thank you!
Hi,
CWA does not have List data type as output parameter.
You can create string output and return the list of data as json string which can be parsed by consumer.
Something like this -
public class Employee
{
public string Name {get;set;},
public string Email {get;set;}
}
List<Employee> employees =new List<Employee>();
//Add Employee data to List
//Convert List<Employee> to Json string
string output=JsonConvert.Serialize<string>(employees);
Please mark my answer verified if this is helpful!
Regards,
Bipin Kumar
Follow my Blog: xrmdynamicscrm.wordpress.com/
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156