Click or drag to resize

AdministrationClientReplaceAllUserLookupListValues Method

Syntax
C#
public Result ReplaceAllUserLookupListValues(
	ManagementGroupRequestOfUserLookupListReplaceAllValues request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfUserLookupListReplaceAllValues

Return Value

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

  var userLookupListReplaceAllValues = new AdministrationService.UserLookupListReplaceAllValues();
  userLookupListReplaceAllValues.UserLookupList_RSN = Guid.Empty; //Required - Optional if UserLookupList_KeyCode is supplied
  userLookupListReplaceAllValues.UserLookupList_KeyCode = "User lookup list keycode"; //Required - Optional if UserLookupList_RSN is supplied
  var userLookupListValueList = new List<AdministrationService.UserLookupListValue>();

  var userLookupListValue = new AdministrationService.UserLookupListValue();
  userLookupListValue.RSN = new Guid("5a5a5bc5-7b5c-4c68-9cdc-8ba90991ddd1");;//Optional - will be generated if not supplied
  userLookupListValue.DisplayValue = "Value1"; //Required
  userLookupListValue.KeyCode = "V1"; //Required
  userLookupListValue.SortOrder = 1; //Required
  userLookupListValueList.Add(userLookupListValue);

  userLookupListValue = new AdministrationService.UserLookupListValue();
  userLookupListValue.RSN = Guid.Empty;//Optional - will be generated if not supplied
  userLookupListValue.DisplayValue = "Value2"; //Required
  userLookupListValue.KeyCode = "V2"; //Required
  userLookupListValue.SortOrder = 2; //Required
  userLookupListValueList.Add(userLookupListValue);

  userLookupListReplaceAllValues.Values = userLookupListValueList.ToArray();//Optional

  request.Value = userLookupListReplaceAllValues;//Required

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

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