public string CreateCustomField( string fieldName, CustomFieldDataType dataType, List<string> options) { return CreateCustomField(fieldName, dataType, options, true); }
public string CreateCustomField( string fieldName, CustomFieldDataType dataType, List <string> options) { return(CreateCustomField(fieldName, dataType, options, true)); }
public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List<string> options) { string json = HttpHelper.Post(string.Format("/lists/{0}/customfields.json", _listID), null, JavaScriptConvert.SerializeObject( new Dictionary<string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options } }) ); return JavaScriptConvert.DeserializeObject<string>(json); }
public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List<string> options) { return HttpHelper.Post<Dictionary<string, object>, string>( string.Format("/lists/{0}/customfields.json", ListID), null, new Dictionary<string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options } }); }
public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List <string> options) { string json = HttpHelper.Post(string.Format("/lists/{0}/customfields.json", _listID), null, JavaScriptConvert.SerializeObject( new Dictionary <string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options } }) ); return(JavaScriptConvert.DeserializeObject <string>(json)); }
public string CreateCustomField(string listId, string name, CustomFieldDataType type) { var list = new List(auth, listId); var sanitizedName = SanitizeKeyName(name); try { return(list.CreateCustomField(sanitizedName, type, null)); } catch (Exception ex) { throw new Exception(String.Format("Error creating custom field '{0}'. {1}", name, ex.Message)); } }
public string CreateCustomField( string fieldName, CustomFieldDataType dataType, List <string> options, bool visibleInPreferenceCenter) { return(HttpPost <Dictionary <string, object>, string>( string.Format("/lists/{0}/customfields.json", ListID), null, new Dictionary <string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options }, { "VisibleInPreferenceCenter", visibleInPreferenceCenter } })); }
public string CreateCustomField( string fieldName, CustomFieldDataType dataType, List<string> options, bool visibleInPreferenceCenter) { return HttpPost<Dictionary<string, object>, string>( string.Format("/lists/{0}/customfields.json", ListID), null, new Dictionary<string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options }, { "VisibleInPreferenceCenter", visibleInPreferenceCenter } }); }