No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
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. It extends the Metadata metadata type and inherits its fullName field.
You must specify the full name whenever you create or update a custom field. For example, a custom field on a custom object:
1MyArticleType__kav.MyCustomField__cDeclarative 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 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 will retrieve the files objects/MyCustomObject__c.object, objects/Account.object__c.object and objects/MyArticleType__kav.object, each containing one custom field definition.
1<types>
2 <members>MyCustomObject__c.MyCustomField__c</members>
3 <members>Account.MyCustomAccountField__c</members>
4 <members>MyArticleType__kav.MyOtherCustomField__c</members>
5 <name>CustomField</name>
6</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.
| Field Name | Field Type | Description |
|---|---|---|
| defaultValue | string | If specified, represents the default value of the field. |
| deleteConstraint | DeleteConstraint (enumeration of type string) | Provides deletion options for lookup
relationships. Valid values are:
For more information on lookup relationships, see “Object Relationships” in the Salesforce Help. |
| description | string | Description of the field. |
| formula | string | If specified, represents a formula on the field. |
| formulaTreatBlankAs | TreatBlanksAs (enumeration of type string) | Indicates how to treat blanks in a formula. Valid values are BlankAsBlank and BlankAsZero. |
| fullName | string | Inherited from Metadata, this field is not defined in the WSDL for this metadata type. It must be specified when creating, updating, or deleting. See create() to see an example of this field specified for a call. |
| inlineHelpText | string | Represents the content of field-level help. For more information, see “Defining Field-Level Help” in the Salesforce Help. |
| label | string | Label for the field. You cannot update the label for standard fields in Article Type such as Title, UrlName, Summary, etc. |
| length | int | Length of the field. |
| picklist | Picklist (Including Dependent Picklist) | If specified, the field is a picklist, and this field enumerates the picklist values and labels. |
| referenceTo | string | If specified, indicates a reference this field has to another object. |
| relationshipLabel | string | Label for the relationship. |
| relationshipName | string | 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. |
| required | boolean | Indicates whether the field requires a value on creation (true) or not (false). |
| type | FieldType | Required. Indicates the field type for the field. Valid values
are:
|
| visibleLines | int | Indicates the number of lines displayed for the field. |
Declarative Metadata Sample Definition
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
3....
4<fields>
5 <fullName>Comments__c</fullName>
6 <description>add your comments about this object here</description>
7 <label>Comments</label>
8 <length>32000</length>
9 <type>LongTextArea</type>
10 <visibleLines>30</visibleLines>
11 </fields>
12....
13</CustomObject>