> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.IUserDefinedFieldInfoAgent

# \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent">\</a> Interface IUserDefinedFieldInfoAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

Returns information about user-defined fields, like field type, field size, field label text, default value. Does not return the actual values in the user-defined fields. The values are returned on the entity objects.

```csharp theme={null}
public interface IUserDefinedFieldInfoAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_ChangeFieldTypeAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_SuperOffice\_WebApi\_Data\_UDefFieldType\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ChangeFieldTypeAsync(UserDefinedFieldInfo, UDefFieldType, bool, RequestOptions)

Create a UserDefinedFieldInfo based on a owner-entity id

```csharp theme={null}
Task<UserDefinedFieldInfo> ChangeFieldTypeAsync(UserDefinedFieldInfo info, UDefFieldType fieldType, bool isIndexed, RequestOptions requestOptions = null)
```

#### Parameters

`info` [UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)

The user-defined field info carrier to want to modify

`fieldType` [UDefFieldType](SuperOffice.WebApi.Data.UDefFieldType.md)

The new field type you want

`isIndexed` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The new indexed status you want

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_ClearCachesAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ClearCachesAsync(RequestOptions)

Clear all relevant caches. This is normally done automatically but can be useful in certain circumstances.

```csharp theme={null}
Task ClearCachesAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_CreateDefaultUserDefinedFieldInfoAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultUserDefinedFieldInfoAsync(RequestOptions)

Set default values into a new UserDefinedFieldInfo.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<UserDefinedFieldInfo> CreateDefaultUserDefinedFieldInfoAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

A blank UserDefinedFieldInfo

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_CreateUserDefinedFieldInfoAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_Data\_UDefFieldType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateUserDefinedFieldInfoAsync(UDefType, UDefFieldType, RequestOptions)

Create a UserDefinedFieldInfo based on a owner-entity id

```csharp theme={null}
Task<UserDefinedFieldInfo> CreateUserDefinedFieldInfoAsync(UDefType ownerType, UDefFieldType fieldType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`fieldType` [UDefFieldType](SuperOffice.WebApi.Data.UDefFieldType.md)

The field type of the new field

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_DeleteUserDefinedFieldInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteUserDefinedFieldInfoAsync(int, RequestOptions)

Deletes the UserDefinedFieldInfo

```csharp theme={null}
Task DeleteUserDefinedFieldInfoAsync(int userDefinedFieldInfoId, RequestOptions requestOptions = null)
```

#### Parameters

`userDefinedFieldInfoId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the UserDefinedFieldInfo

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_DetectColumnIdChangesAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DetectColumnIdChangesAsync(UDefType, RequestOptions)

Detect columnid changes to the admin version (for determining publish warning)

```csharp theme={null}
Task<bool> DetectColumnIdChangesAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The owner type

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if columnid changes where found. i.e. if data needs to be moved during publishing.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_DetectUnpublishedChangesAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DetectUnpublishedChangesAsync(UDefType, RequestOptions)

Detect changes to the admin version (unpublished)

```csharp theme={null}
Task<bool> DetectUnpublishedChangesAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The owner type

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Returns true if any changes were found. This includes cosmetic changes.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync(UserDefinedFieldInfo, RequestOptions)

Kind of the reverse of SetListTableIdAndUDListDefinitionIdFromSelectedListId

```csharp theme={null}
Task<int> FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync(UserDefinedFieldInfo info, RequestOptions requestOptions = null)
```

#### Parameters

`info` [UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetChangedPageOneFieldsAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetChangedPageOneFieldsAsync(UDefType, int, RequestOptions)

Gets which page one fields have changed from the current version

```csharp theme={null}
Task<bool[]> GetChangedPageOneFieldsAsync(UDefType ownerType, int userGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of UserGroup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetCustomFieldInfoAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetCustomFieldInfoAsync(string, string, RequestOptions)

Return information about a particular custom field (user-defined + extra) on a particular table

```csharp theme={null}
Task<FieldInfoBase> GetCustomFieldInfoAsync(string tableName, string fieldName, RequestOptions requestOptions = null)
```

#### Parameters

`tableName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of table that owns the custom fields. e.g. 'contact', 'person', 'project' etc.

`fieldName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the field: prog:id or field name. e.g. 'SuperOffice:21' or 'x\_foobar'

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[FieldInfoBase](SuperOffice.WebApi.Data.FieldInfoBase.md)\&gt;

user-defined or extra field info. Describes default values, mandatory, visiblity, labels and choices.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetCustomFieldInfoListAsync\_System\_String\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetCustomFieldInfoListAsync(string, bool, RequestOptions)

Return information about all the custom fields (user-defined + extra) on a particular table

```csharp theme={null}
Task<FieldInfoBase[]> GetCustomFieldInfoListAsync(string tableName, bool includeStandard, RequestOptions requestOptions = null)
```

#### Parameters

`tableName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of table that owns the custom fields. e.g. 'contact', 'person', 'project' etc.

`includeStandard` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Include standard fields in result. Default false.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[FieldInfoBase](SuperOffice.WebApi.Data.FieldInfoBase.md)\[]\&gt;

Array of user-defined and extra field info in rank order. Describes default values, mandatory, visiblity, labels and choices.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetPublishedUserDefinedFieldFromFieldLabelAsync\_System\_String\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedUserDefinedFieldFromFieldLabelAsync(string, UDefType, RequestOptions)

Return information about the given user defined field identified by the owner and the field label. Note that field labels are fuzzy. Leading and trailing spaces and punctuation are ignored.

```csharp theme={null}
Task<UserDefinedFieldInfo> GetPublishedUserDefinedFieldFromFieldLabelAsync(string fieldLabel, UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`fieldLabel` [string](https://learn.microsoft.com/dotnet/api/system.string)

The field label - the text label shown in the user interface. Trailing spaces and punctuation (":" and ".") are ignored when searching.

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier, or null if no matching field is found.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetPublishedUserDefinedFieldFromProgIdAsync\_System\_String\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedUserDefinedFieldFromProgIdAsync(string, UDefType, RequestOptions)

Return information about the given user defined field identified by the owner and the prog-id. The prog-id is used as the key in the entity carriers.

```csharp theme={null}
Task<UserDefinedFieldInfo> GetPublishedUserDefinedFieldFromProgIdAsync(string progId, UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`progId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The prog.id is a hidden name that uniquely identifies the field.

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier, or null if no matching field is found.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetPublishedUserDefinedFieldListAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedUserDefinedFieldListAsync(UDefType, RequestOptions)

Return information about all the user defined fields on a particular owner type (project, contact, person, etc).

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetPublishedUserDefinedFieldListAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of user-defined field info carriers.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetPublishedUserDefinedPageOneFieldsAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPublishedUserDefinedPageOneFieldsAsync(UDefType, int, RequestOptions)

Get a list of page one fields for given Udef type and current user group

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetPublishedUserDefinedPageOneFieldsAsync(UDefType ownerType, int userGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of UserGroup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of page one user-defined field info carriers.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldFromFieldLabelAsync\_System\_String\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldFromFieldLabelAsync(string, UDefType, RequestOptions)

Return information about the given user defined field identified by the owner and the field label. Note that field labels are fuzzy. Leading and trailing spaces and punctuation are ignored. Note this may be different than the currently published fields.

```csharp theme={null}
Task<UserDefinedFieldInfo> GetUserDefinedFieldFromFieldLabelAsync(string fieldLabel, UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`fieldLabel` [string](https://learn.microsoft.com/dotnet/api/system.string)

The field label - the text label shown in the user interface. Trailing spaces and punctuation (":" and ".") are ignored when searching.

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier, or null if no matching field is found.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldFromIdsAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldFromIdsAsync(int\[], RequestOptions)

Return an given array of user defined field identified by the ids.

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetUserDefinedFieldFromIdsAsync(int[] ids, RequestOptions requestOptions = null)
```

#### Parameters

`ids` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

Array of user defined field ids

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of user-defined field info carriers

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldFromProgIdAsync\_System\_String\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldFromProgIdAsync(string, UDefType, RequestOptions)

Return information about the given user defined field identified by the owner and the prog-id. The prog-id is used as the key in the entity carriers. Note this may be different than the currently published fields.

```csharp theme={null}
Task<UserDefinedFieldInfo> GetUserDefinedFieldFromProgIdAsync(string progId, UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`progId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The prog.id is a hidden name that uniquely identifies the field.

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

Returns the user-defined field info carrier, or null if no matching field is found.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldFromProgIdsAsync\_System\_String\_\_\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldFromProgIdsAsync(string\[], UDefType, RequestOptions)

Return an given array user defined field identified by the owner and the prog-ids. The prog-id is used as the key in the entity carriers. Note this may be different than the currently published field layout.

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetUserDefinedFieldFromProgIdsAsync(string[] progIds, UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`progIds` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

The prog.id is a hidden name that uniquely identifies the field.

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of user-defined field info carriers

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldInfoAsync(int, RequestOptions)

Gets a specific UserDefinedFieldInfo object.

```csharp theme={null}
Task<UserDefinedFieldInfo> GetUserDefinedFieldInfoAsync(int userDefinedFieldInfoId, RequestOptions requestOptions = null)
```

#### Parameters

`userDefinedFieldInfoId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the UserDefinedFieldInfo object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

UserDefinedFieldInfo

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedFieldListAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldListAsync(UDefType, RequestOptions)

Return information about all the user defined fields on a particular owner type (project, contact, person, etc). Note this may be different than the currently published fields.

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetUserDefinedFieldListAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of user-defined field info carriers.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_GetUserDefinedPageOneFieldsAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedPageOneFieldsAsync(UDefType, int, RequestOptions)

Get a list of page one fields for given Udef type and current user group

```csharp theme={null}
Task<UserDefinedFieldInfo[]> GetUserDefinedPageOneFieldsAsync(UDefType ownerType, int userGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of UserGroup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]\&gt;

Returns an array of page one user-defined field info carriers.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_IsAnyPublishEventActiveAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IsAnyPublishEventActiveAsync(RequestOptions)

Check if any publish events are active

```csharp theme={null}
Task<bool> IsAnyPublishEventActiveAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_IsPublishEventActiveAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IsPublishEventActiveAsync(UDefType, RequestOptions)

Check if the publish event is active for the given type

```csharp theme={null}
Task<bool> IsPublishEventActiveAsync(UDefType type, RequestOptions requestOptions = null)
```

#### Parameters

`type` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_PublishAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> PublishAsync(UDefType, RequestOptions)

Publish changed Udef fields for the given owner type

```csharp theme={null}
Task<int> PublishAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The owner type to publish for

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

Batch task id or 0 that handles publishing.

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_RevertAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RevertAsync(UDefType, RequestOptions)

Revert changed Udef fields for the given owner type - all unpublished changes will be lost

```csharp theme={null}
Task RevertAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The owner type to revert fields for

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SaveUserDefinedFieldInfoAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveUserDefinedFieldInfoAsync(UserDefinedFieldInfo, RequestOptions)

Updates the existing UserDefinedFieldInfo or creates a new UserDefinedFieldInfo if the id parameter is 0.

```csharp theme={null}
Task<UserDefinedFieldInfo> SaveUserDefinedFieldInfoAsync(UserDefinedFieldInfo userDefinedFieldInfo, RequestOptions requestOptions = null)
```

#### Parameters

`userDefinedFieldInfo` [UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)

The UserDefinedFieldInfo that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

New or updated UserDefinedFieldInfo

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SaveUserDefinedFieldInfosAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveUserDefinedFieldInfosAsync(UserDefinedFieldInfo\[], RequestOptions)

Save an array of user defined fields. This will update the unpublished layout.

```csharp theme={null}
Task SaveUserDefinedFieldInfosAsync(UserDefinedFieldInfo[] infos, RequestOptions requestOptions = null)
```

#### Parameters

`infos` [UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\[]

An array of user defined fields

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SetListTableIdAndUDListDefinitionIdFromSelectedListIdAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetListTableIdAndUDListDefinitionIdFromSelectedListIdAsync(UserDefinedFieldInfo, int, RequestOptions)

Make stuff similar to what happens in the win client

```csharp theme={null}
Task<UserDefinedFieldInfo> SetListTableIdAndUDListDefinitionIdFromSelectedListIdAsync(UserDefinedFieldInfo info, int selectedListId, RequestOptions requestOptions = null)
```

#### Parameters

`info` [UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)

`selectedListId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[UserDefinedFieldInfo](SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SetPageOneFieldGroupingAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetPageOneFieldGroupingAsync(UDefType, bool, RequestOptions)

Sets the Page One Field grouping for a specific entity

```csharp theme={null}
Task SetPageOneFieldGroupingAsync(UDefType ownerType, bool active, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`active` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

If true, use grouping

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SetPublishStartSystemEventAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetPublishStartSystemEventAsync(UDefType, RequestOptions)

Set the start flag for udef publishing. Must be called before PUBLISH, or PUBLISH will fail. Start flag is removed when publish process completes.

```csharp theme={null}
Task SetPublishStartSystemEventAsync(UDefType ownerType, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SetRankOnFieldsAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetRankOnFieldsAsync(UDefType, int\[], RequestOptions)

Change rank of user defined fields

```csharp theme={null}
Task SetRankOnFieldsAsync(UDefType ownerType, int[] rankedFieldsIds, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner-entity.

`rankedFieldsIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

All IDs of this owner-entity in desired rank order

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IUserDefinedFieldInfoAgent\_SetUserDefinedPageOneFieldAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetUserDefinedPageOneFieldAsync(UDefType, int, int, int, RequestOptions)

Sets a user defined fields as page one field.

```csharp theme={null}
Task SetUserDefinedPageOneFieldAsync(UDefType ownerType, int udefFieldId, int userGroupId, int fieldLineNo, RequestOptions requestOptions = null)
```

#### Parameters

`ownerType` [UDefType](SuperOffice.WebApi.Data.UDefType.md)

The user-defined field owner entity

`udefFieldId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The id of the udeffield to set as page one field

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The usergroup id to associate the page one field with.

`fieldLineNo` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Page one line number

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)


## Related topics

- [SuperOffice.WebApi.Agents.UserDefinedFieldInfoAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.UserDefinedFieldInfoAgent.md)
- [How to display all user-defined fields](/en/api/web-services/howto/custom-objects/get-udef-list-and-values.md)
