Add a Field to a Custom Object

You add fields to objects and system attributes from the object designer Fields page.

When creating fields, you select the field type and specify options for the field that change depending on the type of field you create. While the options on the Fields page are similar when editing objects and system attributes, there are some differences, which are noted in the procedure.
  1. Click Configuration on the navigation pane.
  2. Expand Database, and then double-click Object Designer.
  3. Select the object or system attribute to which you want to add a field.
  4. Click Fields.
    Note: Each object can contain a maximum of 500 fields, but the actual number of fields you can add is restricted by the amount of space each field uses in the database. For example, while an object could have 500 fields with a Yes/No data type, far fewer fields with a Text data type would be allowed since text fields use much more space in the database than Yes/No fields.
  5. To add predefined fields to the object, select the fields you want in the Predefined Fields area of the page. Predefined fields are not available for system attributes.

    Predefined Fields

    Field Description
    Created Time Select this check box to add the CreatedTime field to the object table. This field tracks when custom object records are created and is updated automatically.
    Created by Account Select this check box to add the CreatedByAccount field to the object table. This field tracks which staff members create custom object records and is updated automatically.

    When you add this field to a custom object, a relationship to the accounts table is automatically created. In rare cases, if the record was not created by a staff member, this field may not resolve correctly.

    Updated Time Select this check box to add the UpdatedTime field to the object table. This field tracks when custom object records are edited and is updated automatically.
    Updated by Account Select this check box to add the UpdatedByAccount field to the object table. This field tracks which staff members update custom object records and is updated automatically.

    When you add this field to a custom object, a relationship to the accounts table is automatically created. In rare cases, if the most recent update was not by a staff member, this field may not resolve correctly.

    File Attachments Select this check box to add the FileAttachments field to the object table. Add this field to allow file attachments to be added to custom object records.

    When you add a file attachment to a custom object record, you can change the file name, but the Description and Display Name properties that can be specified for attachments added to standard object records, such as incidents, are not available.

    Labels Select this check box to add the Labels field to the object table. This field should be added if individual records in the custom object require their own visible labels. (For example, each incident status on your site has a distinct label and each status is a unique record in the incident statuses table.)

    A separate Label field is created for each language used on your B2C Service site. This lets you enter a different label for each language.

    Descriptions Select this check box to add the Descriptions field to the object table. This field is used to store text descriptions of records you add to the object.
    Notes Select this check box to add a Notes field to the object table where notes about individual records can be stored.
  6. To add a customized field to the custom object, click Add New Field.
  7. Select the type of data the field will store.

    Data Types

    Data Type Description
    Yes/No Select this option to add a field to store Yes or No values (stored as 1 and 0, respectively, in the database). Staff members use drop-down lists to enter values in Yes/No fields.
    Date Select this option to add a field to store a date. Staff members can type values in date fields or select dates using a calendar.
    Date/Time Select this option to add a field to store a date and time. Staff members can type values in date/time fields or use a calendar to select dates.
    Integer Select this option to add a field to store numeric values (for example, product or registration numbers). Integer fields can store numbers from -2147483648 to 2147483647.
    Text Select this option to add a text field. Text fields can be encrypted, and they can be configured to store text, email addresses, or URLs.
    Note: Encrypted fields are available only in the Agent Browser User Interface (Agent Browser UI). These fields can be only decrypted by agents with the Allow Custom Attribute Decryption permission. See Overview of Custom Attribute Encryption.
    Menu Select this option to add a field with a drop-down list from which staff members can select items.

    Only one value can be selected at a time in custom object menu fields.

    Decimal Select this option to add a field to store decimal-format data.
  8. Enter field information.
    Note: Some options are disabled when using certain field types.

    Field Information

    Field Description
    Name Enter the name you want for the field. The name you specify is used in the database. To specify a different display name for the field, enter a label name in the Interface Label area, which is also described in this table.

    The name cannot exceed 30 characters.

    Field Options Select options for customized fields in this area. Some options are disabled for certain field types.
    Is Auto Update Select this check box to automatically update the field value when the record is updated.

    This option is available only for fields with Date, Date/Time, or Integer data types. Auto-update fields are read-only.

    Is Nullable Select this check box to allow null values in the field. Entering values in fields that allow null values is optional when editing a record.

    Fields in deployed objects that have this option selected cannot be later edited to remove the option. However, fields in deployed objects can be edited to add this option. This option is always enabled for system attribute fields.

    Is Read Only Select this check box to give the field read-only access. When this option is selected, values stored in the field cannot be edited but can be used to display information. A default value must be specified for fields that have this option selected.

    This option is available only for fields with Date, Date/Time, or Integer data types.

    Is In Single-Field Index Select this option to add an index entry for the field in cases where the field is the only field in the index. To add a multiple-field index, click the Indices button on the ribbon and perform the steps regarding indexes in the Create a Custom Object procedure.

    This option is available only for fields with Date, Date/Time, Integer, or Text data types. Encrypted fields aren't indexable.

    Yes/No Field Settings Click the Constant Default drop-down list and select a default value for the field. The available options are None, Yes, and No.
    Date and Date/Time Field Settings Select options for Date and Date/Time fields in this area.
    Dynamic Default Click this drop-down list to select a value used to dynamically populate the field. The dynamic values available for Date and Date/Time fields are the current date or the current time, respectively. This field is set to None by default.

    Dynamic default values are written to a record when the record is saved to the database. When editing an existing record, the dynamic default value is incremented only when another field is edited and the record is saved.

    Constant Default Enter a value in this area to use as a default for the field or click the calendar to select a date from a calendar. When you select a date from the calendar for a Date/Time field, the time is automatically set to 12:00 A.M. If you want a different time, you can type it in the field.
    Minimum Value Enter a value in this area or click the calendar icon to select the minimum date allowed in the field. You can enter dates between January 1, 1000 and December 30, 9999.

    This option is available only for Date fields.

    Maximum Value Enter a value in this area or click the calendar icon to select the maximum date allowed in the field. You can enter dates between January 2, 1000 and December 31, 9999.

    This option is available only for Date fields.

    Integer Field Settings Select options for integer fields in this area.
    Dynamic Default Click this drop-down list to select a value used to dynamically populate the field. The dynamic values available for integer fields are the current staff member’s account ID or an incremental value. This field is set to None by default.

    Incremental values apply to individual records. All records with dynamic default integer fields initially have a value of 1 in the field. In addition, dynamic default values are written to a field when the record is saved to the database. When editing an existing record, the dynamic default value is incremented only when another field is edited and the record is saved.

    Constant Default Enter a value in this area to use as a default for the field. This option is disabled when an option other than None is selected in the Dynamic Default field.
    Minimum/Maximum Enter the minimum and maximum values allowed for the field in these fields.
    Text Field Settings Select options for text fields in this area.
    Field Usage Click this drop-down list to select the type of text field you want to create. These field types are available:
    • Plain Text—Select this option to configure the text field to store from 1 to 255 characters. The maximum number of characters is typed in the Length of Field field.
    • Long Text—Select this option to configure the text field to store one megabyte of characters.
    • Email—Select this option to configure the text field to store email addresses, up to 80 characters in length. Validation is automatically performed on the text entered in this type of field to ensure it corresponds to email patterns defined in the DE_VALID_EMAIL_PATTERN configuration setting.
    • URL—Select this option to configure the text field to store URLs, up to 255 characters in length. Validation is automatically performed on text entered in the field to ensure it corresponds to URL patterns.
    • Encrypted—Select this option to encrypt the text field up to 255 characters in length. Validation is performed on the text entered according to the pattern set for the field.

      Encrypted fields are available only in the Agent Browser UI. These fields can be only decrypted by agents with the Allow Custom Attribute Decryption permission. See Overview of Custom Attribute Encryption.

    All text field types, except Long Text and Encrypted, can be indexed.

    Length of Field Enter the maximum number of characters that plain text fields can store in this area. Values from 1 to 255 can be entered.

    This option is available only for plain text fields.

    Pattern Enter a regular expression string pattern to define a format that will be used to verify the contents entered in the field. The carat (^) character is automatically added to the start of the pattern and the dollar sign ($) character is automatically added to the end. This ensures that strings entered in the custom object field match the entire regular expression.

    For example, if you want to create a field to store phone numbers in a format of 123-456-7890, enter a pattern of [0-9]{3}-[0-9]{3}-[0-9]{4}.

    If your Field Usage setting is set to Encrypted, pattern validation is performed against the text entered in the field.

    Encrypted fields are available only in the Agent Browser UI. These fields can be only decrypted by agents with the Allow Custom Attribute Decryption permission. See Overview of Custom Attribute Encryption.

    Note: This option is available only for encrypted text, plain text and long text fields.
    Case Sensitive Sorting Select this check box to recognize case when sorting, with lowercase characters ordered before uppercase characters in ascending order. For example, if the field contents include values of CAT, Cat, cat, and CAt, and case-sensitive sorting is enabled, the contents will be sorted as cat, Cat, CAt, and CAT.
    Defacto Unique for Analytics Select this check box to group the field contents by the custom object unique key or ID number rather than the field values. For example, the First Name field in the contacts table is configured to use this option in reports. When running a report that groups incidents by contacts’ first names, the report automatically groups by the contact ID number (contacts.c_id), which is the primary key in the contacts table. This prevents the incidents submitted by all people with the same first name from being grouped together.
    Menu Field Settings Select options for menu fields in this area.
    Menu Click this drop-down list to select an existing menu field, menu-only custom object, or a custom object with the Object Generates Menu option selected to populate the field menu options. A read-only relationship to the custom object associated with the selected menu is automatically created.
    Dynamic Default Click this drop-down list to select a default value for the menu field that changes dynamically depending on which staff member uses the field and which interface the staff member is logged into. Dynamic default values can be selected for the Accounts By Group, Accounts By Manager, Interfaces, and Languages menu fields.
    Constant Default Click this drop-down list to select a static default value for the menu field. The available options are populated by the options in the menu field.
    Use Current User/Interface/Language as Default Select this check box to set the default value of the menu field to the value that pertains to the logged-in staff member who is working with the custom object records. This option displays only when one of these is selected in the menu field settings drop-down menu:
    • Accounts by Manager—When this field is used, selecting the check box uses the name of the logged-in staff member as the field default value.
    • Accounts by Group—When this field is used, selecting the check box uses the name of the logged-in staff member as the field default value.
    • Interfaces—When this field is used, selecting the check box uses the name of the interface the staff member is currently logged in to.
    • Languages—When this field is used, selecting the check box uses the language of the interface the staff member is currently logged in to.
    Decimal Field Settings Select options for decimal fields in this area.
    Decimal part (0 to 5) Enter the number of digits to display to the right of decimal point, from 0 to a maximum of 5.
    Maximum Value Enter the maximum value allowed for the decimal field.
    Minimum Value Enter the minimum value allowed for the decimal field.
    Interface Label Specify field names in this section. Different labels and descriptions can be used for interfaces with different languages.
    Label Enter the label you want for the field name in this text box. By default, the name specified in the Name field is used as the label. Staff members generally see the field label name when working with the field.

    When a field is initially named, the field label is automatically populated with the field name. If the field name is later edited, the label is not automatically updated.

    Description Enter an optional description for the field in this text box. The description displays as a tooltip when viewing the field in workspaces or the report designer.
  9. To make a text or integer field a lookup field for an object, click the option in the Object Lookup column.
    This option is not available for system attribute fields. The field defined as the object lookup is automatically added as a single-field index to the object. If you do not specify a lookup field, the ID field is automatically selected as a lookup field. If you select the Labels check box on the Fields page, the Labels field that is added to the object is automatically selected as the object lookup field.

    Lookup fields help identify records when you’re working with them. Values in lookup fields are displayed on the editor tab when you’re editing records and in the Recent Items list on the navigation pane. For example, when editing an incident, the incident reference number displays on the editor tab since Incidents.Reference # (incidents.ref_no) is configured as a lookup field in the database. In addition, lookup field values are displayed in reports for fields in other tables that join to the lookup field. For example, if you create an object with a Name field designated as the lookup field, then define a relationship to another object with a NameID field and use this field to join the objects, and then run a report with NameID as an output column, the values in the Name field displays in the column.

    In addition, lookup field values are displayed in reports for fields in other tables that join to the lookup field. For example, if you create an object with a Name field designated as the lookup field, then define a relationship to another object with a NameID field and use this field to join the objects, and then run a report with NameID as an output column, the values in the Name field displays in the column.

  10. To delete a field, click X.
  11. To edit an existing field, select the field in the list of fields and make the changes you want.
    Most fields in deployed custom objects can still be edited, though some options may be disabled for certain field types.
  12. Click Save.