public static string GetCustomValue(RestCommand command, int customValueID) { CustomValue customValue = CustomValues.GetCustomValue(command.LoginUser, customValueID); if (customValue.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } return(customValue.GetXml("CustomValue", true)); }