Click or drag to resize

AdministrationClientInsertUserLookupListValue Method

Syntax
C#
public Result InsertUserLookupListValue(
	ManagementGroupRequestOfUserLookupListValueCreate request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfUserLookupListValueCreate

Return Value

Type: Result
Examples
C#
using (var svc = new AdministrationService.AdministrationClient())
{
  var request = new AdministrationService.ManagementGroupRequestOfUserLookupListValueCreate();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var userLookupListCreate = new AdministrationService.UserLookupListValueCreate();
  userLookupListCreate.RSN = Guid.NewGuid();//Optional - will be generated if not supplied
  userLookupListCreate.KeyCode = "User lookup list value keycode"; //Required - must be unique to the user lookup list
  userLookupListCreate.UserLookupList_KeyCode = "User lookup list keycode"; //Required - Optional if UserLookupList_RSN is supplied
  userLookupListCreate.UserLookupList_RSN = new Guid("6c456e84-6b67-44a8-9032-6eb1aaa08f95");; //Required - Optional if UserLookupList_KeyCode is supplied
  userLookupListCreate.DisplayValue = "Chocolate"; //Required
  userLookupListCreate.SortOrder = 1; //Required

  request.Value = userLookupListCreate; //Required

  AdministrationService.Result result = svc.InsertUserLookupListValue(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also