---
schema_version: "1"
id: 0390d9e88d3b4aec8067967c6b0de89b9ed84429686701f30530f4c631ed16a9
title: ArticleType CustomField
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_articletype_customfield.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_articletype_customfield.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8b01167e2764eab0800e4dbb7afb8618f14e5be8aab6ba6e7ed177c98ca8bc85
description: Represents the metadata associated with an article type custom field. Use this metadata type to create, update, or delete article type custom field definitions.
---
# ArticleType CustomField

Represents the metadata associated with an article type custom field. Use this metadata type to create, update, or delete article type custom field definitions.

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

Always specify the full name whenever you create or update a custom field. For example, a custom field on a custom object:

MyArticleType\_\_kav.MyCustomField\_\_c
      

## Declarative Metadata File Suffix and Directory Location

Custom fields are defined as part of the article type. ArticleType field names have a suffix of \_\_c like other custom objects, and must be dot-qualified with the name of the article type to which they belong. See [ArticleType](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_articletype.htm "Represents the metadata associated with an article type.") for more information.

## Retrieving Custom Fields on Custom or Standard Objects

When you retrieve a custom or standard object, you return everything associated with the object. However, you can also retrieve only the custom fields for an object by explicitly naming the object and fields in package.xml. The following definition in package.xml retrieves the files objects/MyCustomObject\_\_c.object, objects/Account.object\_\_c.object, and objects/MyArticleType\_\_kav.object, each containing one custom field definition.

<types\>
    <members\>MyCustomObject\_\_c.MyCustomField\_\_c</members\>
    <members\>Account.MyCustomAccountField\_\_c</members\>
    <members\>MyArticleType\_\_kav.MyOtherCustomField\_\_c</members\>
    <name\>CustomField</name\>
</types\>
      

## Version

ArticleTypes custom fields are available in API version 19.0 and later.

## Fields for ArticleType

Unless otherwise noted, all fields are createable, filterable, and nillable.

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)

#### Note

If you create a knowledge validation rule, the errors always display at the top of the page, even if you add it beside the field. Therefore, write the errors descriptively so authors know how to satisfy the validation rule. For example, identify which field is causing the error. The Salesforce Classic user interface does not support field level error messages for articles.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d151139e141">Field Name</th>

              <th class="featureTableHeader  " id="d151139e144">Field Type</th>

              <th class="featureTableHeader  " id="d151139e147">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">defaultValue</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">If specified, represents the default value of the field. This field was
                deprecated in API version 48.0.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">deleteConstraint</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_field_types.htm" title="These field types extend the field types described in the Salesforce Object Reference.">Metadata Field Types</a> (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)
              </td>

              <td class="entry" headers="d151139e147" data-title="Description">Provides deletion options for lookup relationships. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Cascade</samp>—Deletes the lookup record
                    as well as associated lookup fields.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Restrict</samp>—Prevents the record from
                    being deleted if it's in a lookup relationship.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">SetNull</samp>—This is the default. If
                    the lookup record is deleted, the lookup field is cleared.
                  </li>

                </ul>
                <p class="p">For more information on lookup relationships, see "Object Relationships" in
                  Salesforce Help.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">Description of the field.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">formula</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">If specified, represents a formula on the field.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">formulaTreatBlankAs</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_field_types.htm" title="These field types extend the field types described in the Salesforce Object Reference.">Metadata Field Types</a> (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)
              </td>

              <td class="entry" headers="d151139e147" data-title="Description">Indicates how to treat blanks in a formula. Valid values are: <samp class="codeph nolang">BlankAsBlank</samp> and <samp class="codeph nolang">BlankAsZero</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">fullName</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">Inherited from <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm" title="The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.">Metadata</a>,
                this field is defined in the WSDL for this metadata type. It must be specified when
                creating, updating, or deleting. See <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_createMetadata.htm" title="Adds one or more new metadata components to your organization synchronously."><samp class="codeph java">createMetadata()</samp></a> to see an example of this
                field specified for a call.<p class="p" id="no_null_para"><a name="no_null_para"><!-- --></a>This value cannot be <samp class="codeph java">null</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">inlineHelpText</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">Represents the content of field-level help. For more information, see "Define
                Field-Level Help" in Salesforce Help.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">label</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">Label for the field. You cannot update the label for standard fields in Article
                Type such as Title, UrlName, Summary, etc.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">length</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">int</td>

              <td class="entry" headers="d151139e147" data-title="Description">Length of the field.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">picklist</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_picklist.htm" title="Deprecated. Represents a picklist (or dependent picklist) definition for a custom field in a custom object or a custom or standard field in a standard object, such as an account.">Picklist (Including
                  Dependent Picklist)</a></td>

              <td class="entry" headers="d151139e147" data-title="Description">(<strong class="ph b">Deprecated.</strong> Use this field in API version 37.0 and earlier only. In
                later versions, use <span class="keyword parmname">valueSet</span> instead.) If specified, the field
                is a picklist, and this field enumerates the picklist values and labels.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">referenceTo</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">If specified, indicates a reference this field has to another object.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">relationshipLabel</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">Label for the relationship.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">relationshipName</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">string</td>

              <td class="entry" headers="d151139e147" data-title="Description">If specified, indicates the value for one-to-many relationships. For example,
                in the object MyObject that had a relationship to YourObject, the relationship name
                might be YourObjects.</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">required</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">boolean</td>

              <td class="entry" headers="d151139e147" data-title="Description">Indicates whether the field requires a value on creation (<samp class="codeph java">true</samp>) or not (<samp class="codeph java">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">type</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">FieldType</td>

              <td class="entry" headers="d151139e147" data-title="Description">Required. Indicates the field type for the field. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Checkbox</samp> available in version 30.0 and
                    later
                  </li>

                  <li class="li"><samp class="codeph nolang">Currency</samp></li>

                  <li class="li"><samp class="codeph nolang">ArticleCurrency</samp></li>

                  <li class="li"><samp class="codeph nolang">Date</samp></li>

                  <li class="li"><samp class="codeph nolang">DateTime</samp></li>

                  <li class="li"><samp class="codeph nolang">Email</samp></li>

                  <li class="li"><samp class="codeph nolang">File</samp></li>

                  <li class="li"><samp class="codeph nolang">Formula</samp></li>

                  <li class="li"><samp class="codeph nolang">Html</samp></li>

                  <li class="li"><samp class="codeph nolang">Lookup</samp></li>

                  <li class="li"><samp class="codeph nolang">Number</samp></li>

                  <li class="li"><samp class="codeph nolang">Percent</samp></li>

                  <li class="li"><samp class="codeph nolang">Phone</samp></li>

                  <li class="li"><samp class="codeph nolang">Picklist</samp></li>

                  <li class="li"><samp class="codeph nolang">DependentPicklist</samp></li>

                  <li class="li"><samp class="codeph nolang">MultiselectPicklist</samp></li>

                  <li class="li"><samp class="codeph nolang">Text</samp></li>

                  <li class="li"><samp class="codeph nolang">TextArea</samp></li>

                  <li class="li"><samp class="codeph nolang">LongTextArea</samp></li>

                  <li class="li"><samp class="codeph nolang">URL</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d151139e141" data-title="Field Name"><span class="keyword parmname">visibleLines</span></td>

              <td class="entry" headers="d151139e144" data-title="Field Type">int</td>

              <td class="entry" headers="d151139e147" data-title="Description">Indicates the number of lines displayed for the field.</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <fields>
        <fullName>Comments\_\_c</fullName>
        <description>add your comments about this object here</description>
        <label>Comments</label>
        <length>32000</length>
        <type>LongTextArea</type>
        <visibleLines>30</visibleLines>
    </fields>
</CustomObject>

#### See Also

- [ArticleType](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_articletype.htm "Represents the metadata associated with an article type.")
- [ArticleType Layout](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_articletype_layout.htm "Represents the metadata associated with an article type page layout. Article type layouts determine which fields users can view and edit when entering data for an article. Article type layouts also determine which sections appear when users view articles.")