<PackageReference Include="Relativity.Server.Testing.Framework.Api.SDK" Version="5000.1.0" />

IFieldService

public interface IFieldService
Represents the field API service.
TFieldModel Create<TFieldModel>(int workspaceId, TFieldModel entity) where TFieldModel : Field

Creates the specified field.

void Delete(int workspaceId, int entityId)

Deletes the field by ID.

Field Get(int workspaceId, int entityId)

Gets the field by the specified ID. Returns only base parameters of field.

TFieldModel Get<TFieldModel>(int workspaceId, int entityId) where TFieldModel : Field

Gets the field of specified type by the specified ID.

Field Get(int workspaceId, string entityName)

Gets the field by the specified name. Returns only base parameters of field.

TFieldModel Get<TFieldModel>(int workspaceId, string entityName) where TFieldModel : Field

Gets the field of specified type by the specified name.

TFieldModel Require<TFieldModel>(int workspaceId, TFieldModel entity) where TFieldModel : Field

Requires the specified field. If [ArtifactID](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Artifact.html#Relativity_Testing_Framework_Models_Artifact_ArtifactID) property of entity has positive value, gets entity by ID and updates it.If [Name](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.NamedArtifact.html#Relativity_Testing_Framework_Models_NamedArtifact_Name) property of entity has a value, gets entity by name and updates it if it exists.Otherwise creates a new entity.

void Update<TFieldModel>(int workspaceId, TFieldModel entity) where TFieldModel : Field

Updates the specified field.