I am trying to send a message from the a text field to many custID's.
When selecting many users (after applying a filter on a view) I have a custom action that has the following code.
- void SMS.sendsms(Setup_Customer_Contacts VCustomer)
- {
- querystring = "";
- for each cust in VCustomer
- {
- querystring = querystring + "custID=" + cust.ID + "&";
- }
- openUrl("#Form:SMS_Content?" + querystring, "popup window", "height=200,width=400");
- }
For the popup window, on "submit" I have the following code:
- l = input.custID;
- for each cust in l
- {
- VCust = Setup_Customer_Contacts [ID == cust];
- if ((VCust.Active = "Yes") && VCust.Method.contains("Text"))
- {
- //SEND MESSAGE
- }
- openUrl("#Script:dialog.close", "same window");
- }
Here is my problem:
My lookup field custID is only accepting one ID at a time. When I try to pass multiple ID's I get an error saying. "The parameter custID should appear at most 1 time(s)."
Do you have any idea on how I fix this? Any help would be GREAT! Thanks!