Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Creating Fields

The Administration API allows you to define the structure of a content type programmatically.

Typically this operation follows the Creating a Content Type Using the .NET SDK operation.

These are the types of fields that you can create:

Fields for Cloud Content Types

The following request creates a field in a cloud content type.

var account = new EverliveAccount(AuthorizationStrategy.MasterKey, "master-key-here");

Field field = new Field
{
    ContentTypeId = contentTypeId,
    Name = "FieldName",
};

account.WorkWith().Application("your-app-id").Type(contentTypeId).Fields().Create(field).ExecuteSync();

The next table lists the required and optional properties that you can include in the Field object in addition to the content type ID ContentTypeId.

Name Type Description
Name Text The name of the field that will appear in Telerik Platform. Cannot contain spaces.
Example: BackendFieldName
Title Text (Optional) A user-friendly name that appears in the portal.
Example: Backend Field Name
DataType Number Specifies the field type. See Supported Field Types for possible values.
IsUnique Boolean Ensures uniqueness for the field values. You receive an error response if you attempt to create a duplicate value in such a field. Cannot be set for fields that already contain duplicate values. Cannot be set for fields of type Array, Relation (multiple), or system (CreatedAt, ModifiedAt, etc.) plus the following Users fields: Username, Password, PasswordSalt, DisplayName, Role, Email, IsVerified, IdentityProvider, Identity, and VerificationCode. Defaults to false if not included in the request body.

Fields for Data Connectors Content Types

The following request creates a field in a content type bound to a Data Connector:

var account = new EverliveAccount(AuthorizationStrategy.MasterKey, "master-key-here");

Field field = new Field
{
    ContentTypeId = contentTypeId,
    Name = "FieldName",
    SourceFieldName = "ExternalName",
    IsReadOnly = false
};

account.WorkWith().Application("your-app-id").Type(contentTypeId).Fields().Create(field).ExecuteSync();

The next table lists the required and optional properties that you can include in the Field object in addition to the content type ID ContentTypeId.

Name Type Description
Name Text The name of the field that will appear in Telerik Platform. Cannot contain spaces.
Example: BackendFieldName
Title Text (Optional) A user-friendly name that appears in the portal.
Example: Backend Field Name
SourceFieldName Text The name of the source field (the column name for relational databases).
Example: CustomerName
IsReadOnly Boolean Specifies if the field should be available only for reading.
DataType Number Specifies the field type. See Supported Field Types for possible values.

You can find more information about IsReadOnly in Creating an SQL Data Connectors Content Type Using the Portal and Creating a Salesforce Data Connectors Content Type Using the Portal.

See Also


Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.