Passing a multiple select field to a function
I am struggling with to get a list of record IDs (in this case from a multiple select field) to a function without the following message:
Wrong DataType specified. The Template Variable Person_ID_List should be of type LIST.
This is the function:
void Functions.Send_Document(list:int Person_ID_List)
{
for each person_record_id in input.Person_ID_List
{
..........
and I'm calling it from here:
email_list = List:Int();
for each person_record_id in sales_quote_record.Email_To
{
email_list.add(person_record_id);
}
thisapp.Functions.Send_Document(email_list);
sales_quote_record.Email_To is the multiple select field of record IDs.
What am I doing wrong? Do I even need to construct email_list or can I just pass the field sales_quote_record.Email_To as is?