> ## 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.UserDefinedFieldInfoAgent

# \<a id="SuperOffice\_WebApi\_Agents\_UserDefinedFieldInfoAgent">\</a> Class UserDefinedFieldInfoAgent

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 class UserDefinedFieldInfoAgent : AgentBase, IUserDefinedFieldInfoAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](SuperOffice.WebApi.Agents.AgentBase.md) ←
[UserDefinedFieldInfoAgent](SuperOffice.WebApi.Agents.UserDefinedFieldInfoAgent.md)

#### Implements

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

#### Inherited Members

[AgentBase.\_json](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (UserDefinedFieldInfoAgent agent = new UserDefinedFieldInfoAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

### \<a id="SuperOffice\_WebApi\_Agents\_UserDefinedFieldInfoAgent\_\_ctor\_System\_Net\_Http\_HttpClient\_">\</a> UserDefinedFieldInfoAgent(HttpClient)

Constructor: 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 UserDefinedFieldInfoAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

### \<a id="SuperOffice\_WebApi\_Agents\_UserDefinedFieldInfoAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> UserDefinedFieldInfoAgent(WebApiOptions, HttpClient)

Constructor: 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 UserDefinedFieldInfoAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_DeleteUserDefinedFieldInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteUserDefinedFieldInfoAsync(int, RequestOptions)

Deletes the UserDefinedFieldInfo

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_DetectUnpublishedChangesAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DetectUnpublishedChangesAsync(UDefType, RequestOptions)

Detect changes to the admin version (unpublished)

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync\_SuperOffice\_WebApi\_Data\_UserDefinedFieldInfo\_SuperOffice\_WebApi\_RequestOptions\_">\</a> FigureOutListIdFromListTableIdAndUDListDefinitionIdAsync(UserDefinedFieldInfo, RequestOptions)

Kind of the reverse of SetListTableIdAndUDListDefinitionIdFromSelectedListId

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_GetUserDefinedFieldInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetUserDefinedFieldInfoAsync(int, RequestOptions)

Gets a specific UserDefinedFieldInfo object.

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_IsAnyPublishEventActiveAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IsAnyPublishEventActiveAsync(RequestOptions)

Check if any publish events are active

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_PublishAsync\_SuperOffice\_WebApi\_Data\_UDefType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> PublishAsync(UDefType, RequestOptions)

Publish changed Udef fields for the given owner type

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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\_UserDefinedFieldInfoAgent\_SetRankOnFieldsAsync\_SuperOffice\_WebApi\_Data\_UDefType\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetRankOnFieldsAsync(UDefType, int\[], RequestOptions)

Change rank of user defined fields

```csharp theme={null}
public 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\_UserDefinedFieldInfoAgent\_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}
public 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.Data.UserDefinedFieldInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.UserDefinedFieldInfo.md)
- [SuperOffice.WebApi.Data.FieldInfoAttachment](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoAttachment.md)
- [SuperOffice.WebApi.Data.FieldInfoBase](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoBase.md)
- [SuperOffice.WebApi.Data.FieldInfoBlob](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoBlob.md)
- [SuperOffice.WebApi.Data.FieldInfoBool](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoBool.md)
- [SuperOffice.WebApi.Data.FieldInfoDate](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoDate.md)
