Skip to content

Instantly share code, notes, and snippets.

@dlively1
Created November 5, 2013 20:43
Show Gist options
  • Save dlively1/7325869 to your computer and use it in GitHub Desktop.
Save dlively1/7325869 to your computer and use it in GitHub Desktop.
Create Account with multi-select value
class Program
{
static void Main(string[] args)
{
string url = "";
string username = "";
string passsword = "";
Console.WriteLine("Starting test....");
SugarClient Sugar = new SugarClient(url, username, passsword);
Console.WriteLine("auth connected");
List<string> multiselect_example = new List<string>();
multiselect_example.Add("A");
multiselect_example.Add("B");
multiselect_example.Add("C");
string returnID = "";
returnID = Sugar.Create("Accounts", new {
name = "Acme Inc",
phone_office = "(555)-555-5555",
description = "Example creating record!",
multiselect_example_c = SugarList.CreateMultiSelect(multiselect_example)
});
Console.WriteLine(returnID);
Console.ReadLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment