---
schema_version: "1"
id: 02bcd259106f6b243066003d43d555307cbfd4c5dcce9590158ecf2a6280c6e3
title: CustomObject
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/customobject.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customobject.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 23ed31b8543914301b9ba6c5f54c118ff9712f2c18101efb95483c0b2e68bfa3
description: Represents a custom object that stores data unique to your org or an external object that maps to data stored outside your org.
---
# CustomObject

Represents a custom object that stores data unique to your org or an external object that maps to data stored outside your org.

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/metadata.htm) metadata type and inherits its fullName field.

Specify all relevant fields when you create or update a custom object. You can’t update a single field on the object. For more information about custom objects, see [Store Information That’s Unique to Your Organization](https://help.salesforce.com/s/articleView?id=platform.dev_object_def.htm&type=5&language=en_US).

You can also use this metadata type to work with customizations of standard objects, such as accounts. For an example, see the section on Standard Objects in [Sample package.xml Manifest Files](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/manifest_samples.htm "HTML (New Window)").

All metadata components have a [fullName](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/metadata.htm#meta_fullname) field, which must be fully specified for any custom object.

For example, the following are fully specified names for a standard object and a custom object respectively:

Account
MyCustomObject\_\_c

And the following is a fully specified name for an external object:

MyExternalObject\_\_x

For sample Java code that creates a custom object, see [Step 3: Walk Through the Java Sample Code](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickstart_java_sample.htm).

## Declarative Metadata File Suffix and Directory Location

Custom object names are automatically appended with \_\_c. The file suffix is .object for the custom object or standard object file.

External object names are automatically appended with \_\_x. The file suffix is .object for the external object file.

Custom, standard, and external objects are stored in the objects folder in the corresponding package directory.

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

#### Note

Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.

## Version

Custom objects are available in API version 10.0 and later. External objects are available in API version 32.0 and later.

1. [ActionOverride](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/actionoverride.htm)  
    Represents an action override on a standard or custom object. Use it to create, update, edit, or delete action overrides. You can access ActionOverride only by accessing its encompassing CustomObject.
2. [BusinessProcess](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_businessprocess.htm)  
    The BusinessProcess metadata type enables you to display different picklist values for users based on their profile.
3. [CompactLayout](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_compactlayout.htm)  
    Represents the metadata associated with a compact layout. This type extends the Metadata metadata type and inherits its fullName field.
4. [CustomField](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm)  
    Represents the metadata associated with a field. Use this metadata type to create, update, or delete custom field definitions on standard, custom, and external objects or standard field definitions on standard objects.
5. [FieldSet](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_fieldset.htm)  
    Represents a field set. A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user's first name, middle name, last name, and business title.
6. [HistoryRetentionPolicy](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_historyretentionpolicy.htm)  
    Represents the policy for archiving field history data. When you set a policy, you specify the number of months that you want to keep field history in Salesforce before archiving it. By default, when Field Audit Trail is enabled, all field history is retained.
7. [Index](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_index.htm)  
    Represents an index defined within a custom [big object](https://developer.salesforce.com/docs/atlas.en-us.264.0.bigobjects.meta/bigobjects/big_object.htm). Use this metadata type to define the composite primary key (index) for a custom big object. This type extends the Metadata metadata type and inherits its fullName field.
8. [ListView](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_listview.htm)  
    ListView allows you to see a filtered list of records, such as contacts, accounts, or custom objects.
9. [MarketingObject](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_marketingobject.htm)  
    A marketing object is a high-volume, low-latency custom object that stores data for personalizing content in your marketing campaigns. A marketing object supports a subset of CustomObject fields and uses the \_\_mo suffix instead of \_\_c.
10. [NamedFilter](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/namedfilter.htm)  
    Represents the metadata associated with a lookup filter. This metadata type is used to create, update, or delete lookup filter definitions. This component has been removed as of API version 30.0 and is only available in previous API versions. The metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomField component.
11. [Picklist (Including Dependent Picklist)](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_picklist.htm)  
    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.
12. [ProfileSearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profilesearchlayouts.htm)  
    Represents a user profile’s search results layouts for an object. ProfileSearchLayouts are similar to SearchLayouts. However, with profile-specific layouts, each user profile can have a different search results layout for an object.
13. [RecordType](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_recordtype.htm)  
    Represents the metadata associated with a record type. Record types let you offer different business processes, picklist values, and page layouts to different users. Use this metadata type to create, update, or delete record type definitions for a custom object.
14. [SearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchlayouts.htm)  
    Represents the metadata associated with the search layouts for an object. You can customize which fields to display for users in search results, search filter fields, lookup dialogs, and recent record lists on tab home pages. You can access SearchLayouts only by accessing its encompassing CustomObject.
15. [SharingReason](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_apexsharingreason.htm)  
    Represents an Apex sharing reason, which is used to indicate why sharing was implemented for a standard or custom object. Apex managed sharing allows developers to use Apex to programmatically share custom objects. When you use Apex managed sharing to share an object, only users with the “Modify All Data” permission can add or change the sharing on the object's record, and the sharing access is maintained when the record owner changes or is deactivated. Sharing reasons for standard objects are available for objects that have a corresponding share object (for example, AccountShare, OpportunityShare) and whose org-wide default can be set to Private or Public Read-Only. Objects on the detail side of a master-detail relationship, which have no share object of their own, aren't supported.
16. [SharingRecalculation](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_apexsharingrecalculation.htm)  
    Represents Apex classes that recalculate the Apex managed sharing for a specific custom object.
17. [ValidationRule](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_validationformulas.htm)  
    Represents a validation rule, which is used to verify that the data a user enters in a record is valid and can be saved. A validation rule contains a formula or expression that evaluates the data in one or more fields and returns a value of true or false. Validation rules also include an error message that your client application can display to the user when the rule returns a value of true due to invalid data.
18. [WebLink](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_weblink.htm)  
    Represents a custom button or link defined in a custom object.
19. [Metadata Field Types](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_field_types.htm)  
    These field types extend the field types described in the _Salesforce Object Reference_.

#### See Also

- [CustomField](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm "Represents the metadata associated with a field. Use this metadata type to create, update, or delete custom field definitions on standard, custom, and external objects or standard field definitions on standard objects.")
- [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.")
- [Picklist (Including Dependent Picklist)](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_picklist.htm "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.")
- [SearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchlayouts.htm "Represents the metadata associated with the search layouts for an object. You can customize which fields to display for users in search results, search filter fields, lookup dialogs, and recent record lists on tab home pages. You can access SearchLayouts only by accessing its encompassing CustomObject.")
- [WebLink](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_weblink.htm "Represents a custom button or link defined in a custom object.")
- [CustomObjectTranslation](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_customobjecttranslation.htm "This metadata type allows you to translate custom objects for a variety of languages.")
- [ListView](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_listview.htm "ListView allows you to see a filtered list of records, such as contacts, accounts, or custom objects.")
- [CompactLayout](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_compactlayout.htm "Represents the metadata associated with a compact layout. This type extends the Metadata metadata type and inherits its fullName field.")

## Fields

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

### actionOverrides

- **Field Type**: [ActionOverride](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/actionoverride.htm)\[\]
- **Description**: List of action overrides on the object. This field is available in API version 18.0 and later.

### allowInChatterGroups

- **Field Type**: boolean
- **Description**: Indicates whether records of this custom object type can be added to Chatter groups (true) or not (false). This field is available in API version 34.0 and later.

### businessProcesses

- **Field Type**: [BusinessProcess](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_businessprocess.htm)\[\]
- **Description**: List of business processes associated with the object. This field is available in API version 17.0 and later.

### compactLayoutAssignment

- **Field Type**: string
- **Description**: Compact layout assigned to the object. This field is available in API version 29.0 and later. This field is available for external objects in API version 42.0 and later.

### compactLayouts

- **Field Type**: [CompactLayout](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_compactlayout.htm)\[\]
- **Description**: List of compact layouts associated with the object. This field is available in API version 29.0 and later. This field is available for external objects in API version 42.0 and later.

### customHelp

- **Field Type**: string
- **Description**: S-control that contains the help content if the object has customized help content. This field is available in API version 14.0 and later.

### customHelpPage

- **Field Type**: string
- **Description**: Visualforce page that contains the help content if the object has customized help content. This field is available in API version 16.0 and later.

### customSettingsType

- **Field Type**: CustomSettingsType (enumeration of type string)
- **Description**: When this field is present, this component isn’t a custom object, but a custom setting. This field returns the type of custom setting. This field is available in API version 17.0 and later.
- **Possible values**:
    - List—static data stored in cache, accessed as part of your app, and available org-wide.
    - Hierarchy—static data stored in cache, accessed as part of your app, and available based on a hierarchy of user, profile, or org. This value is the default.

### customSettingsVisibility

- **Field Type**: CustomSettingsVisibility (enumeration of type string)
- **Description**: When this field is present, this component isn’t a custom object, but a custom setting. This field returns the visibility of the custom setting. This field is available in API versions 17.0 through 33.0. In versions 34.0 and later, use the visibility field instead of this field.
- **Possible values**:
    - Public—if the custom setting is packaged, it’s accessible to all subscribing orgs.
    - Protected—if the custom setting is in a managed package, it’s accessible only to the developer org. Subscribing orgs can’t access it. This value is the default.

### dataStewardGroup

- **Field Type**: string
- **Description**: Removed in API version 47.0.

### dataStewardUser

- **Field Type**: string
- **Description**: Removed in API version 47.0.

### deploymentStatus

- **Field Type**: DeploymentStatus ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**: Indicates the deployment status of the object.

### deprecated

- **Field Type**: boolean
- **Description**: Reserved for future use. Indicates whether a developer deprecated a custom object in a package (true) or not (false).

### description

- **Field Type**: string
- **Description**: Description of the object. Maximum length is 1000 characters.

### enableActivities

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for activities (true) or not (false). Not available for external objects.

### enableBulkApi

- **Field Type**: boolean
- **Description**: When enabled, the object is classified as an Enterprise Application object for usage tracking. When enabled, enableSharing and enableStreamingApi must also be enabled.
    
    This field is available in API version 31.0 and later.

### enableDivisions

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for divisions (true) or not (false). For more information on this field, see [Division](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_division.htm).

### enableEnhancedLookup

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for enhanced lookups (true) or not (false). The custom object must be searchable for enableEnhancedLookup to work. Set enableSearch as true before setting enableEnhancedLookup as true. In API version 28.0 and later, this field can also be used for the Account, Contact, and User objects. Enhanced lookups provide an updated lookup dialog interface that lets users filter, sort, and page through search results and customize search result columns. For more information about enhanced lookups, see [Enable Enhanced Lookups](https://help.salesforce.com/s/articleView?id=ai.search_enhanced_lookup_enable.htm&type=5&language=en_US).

### enableFeeds

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for feed tracking (true) or not (false). For more information, see [Customize Chatter Feed Tracking](https://help.salesforce.com/s/articleView?id=experience.collab_feed_tracking.htm&type=5&language=en_US). This field is available in API version 18.0 and later.

### enableHistory

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for history tracking (true) or not (false). Also available for standard objects in API version 29.0 and later. History tracking on the Account object includes person account history tracking.

### enableLicensing

- **Field Type**: boolean
- **Description**: Indicates whether this object is licensed by Salesforce and users require a permission set license for it (true) or not (false). This field is available in API version 45.0 and later.

### enableReports

- **Field Type**: boolean
- **Description**: Indicates whether the object is enabled for reports (true) or not (false). Support for external objects is available in API version 38.0 and later.

### enableSearch

- **Field Type**: boolean
- **Description**: Indicates whether the object’s records can be found via Salesforce Object Search Language and Salesforce searches (true) or not (false). Corresponds to Allow Search in the user interface. By default, search is turned off for new custom objects. This field is available for custom objects in API version 35.0 and later.
    
    To enhance Einstein Search performance, searchability is turned off for custom objects that haven't been searched for more than 120 days. To enable object and field searchability, contact your admin.
    
    By default, search is turned off for new external objects. However, you can validate and sync an external data source to automatically create external objects. Syncing always enables search on the external object when search is enabled on the external data source, and vice versa. This field is available for external objects in API version 37.0 and later.

### enableSharing

- **Field Type**: boolean
- **Description**: Indicates whether the object is classified as an Enterprise Application object for usage tracking (true) or not (false). When enabled, enableBulkApi and enableStreamingApi must also be enabled.
    
    This field is available in API version 31.0 and later.

### enableStreamingApi

- **Field Type**: boolean
- **Description**: Indicates whether the object is classified as an Enterprise Application object for usage tracking (true) or not (false). When enabled, enableBulkApi and enableSharing must also be enabled.
    
    This field is available in API version 31.0 and later.

### eventType

- **Field Type**: PlatformEventType ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**: This field applies only to platform events. Type of event. This field is available in API version 41.0 and later.
- **Possible values**:
    - HighVolume—For a high-volume platform event.
    - StandardVolume—Deprecated. Creating a platform event with this event type is supported and returns an error.

### externalDataSource

- **Field Type**: string
- **Description**: Required and available only for external objects. The name of the external data source that stores the data for the external object. The data source is represented by the ExternalDataSource component. This field is available in API version 32.0 and later.

### externalName

- **Field Type**: string
- **Description**: Required and available only for external objects. The name of the table in the external data source that contains the data for the external object. This field is available in API version 32.0 and later.

### externalRepository

- **Field Type**: string
- **Description**: Available only for Salesforce Connect external objects. Corresponds to the Display URL Reference Field in the user interface. The external object’s Display URL standard field values are automatically generated from the external system. For example, with the OData 2.0 adapter for Salesforce Connect, the value is based on the link href that’s defined on the OData producer. You can override the default values with the values of a custom field on the same external object. Select the field name, and ensure the custom field’s values are valid URLs.
    
    This field is available in API version 32.0 and later.

### externalSharingModel

- **Field Type**: SharingModel ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**:
    
    External org-wide defaults for the object, which determines the access level for external users.
    
    This field is available in API version 31.0 and later.

### fields

- **Field Type**: [CustomField\[\]](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/customfield.htm)
- **Description**: One or more field names in the object.

### fieldSets

- **Field Type**: [FieldSet](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_fieldset.htm)
- **Description**: Field set that exists on the object.

### fullName

- **Field Type**: string
- **Description**: Full name of the object. It must be specified when creating, updating, or deleting the object. See [createMetadata()](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_createMetadata.htm "Adds one or more new metadata components to your organization synchronously.") to see an example of this field specified for a call. This value can't be null.

### gender

- **Field Type**: Gender
- **Description**: Gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender.

### household

- **Field Type**: boolean
- **Description**: Support for relationship groups, a feature available only with Salesforce for Wealth Management.

### historyRetentionPolicy

- **Field Type**: [HistoryRetentionPolicy](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_historyretentionpolicy.htm)
- **Description**: Reserved for future use.

### indexes

- **Field Type**: [Index\[\]](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_index.htm)
- **Description**: Index for a custom big object.

### label

- **Field Type**: string
- **Description**: Label that represents the object throughout the Salesforce user interface. We recommend that you make object labels unique across all standard, custom, and external objects in the org.

### listViews

- **Field Type**: [ListView](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_listview.htm)\[\]
- **Description**: One or more list views associated with the object.

### namedFilter

- **Field Type**: [NamedFilter](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/namedfilter.htm)\[\]
- **Description**: Represents the metadata associated with a lookup filter. This metadata type is used to create, update, or delete lookup filter definitions. This component has been removed as of API version 30.0 and is only available in previous API versions. The metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomField component. This field is available in API version 17.0 and later.
    
    This field has been removed as of API version 30.0 and is only available in prior versions. The metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomField component.

### nameField

- **Field Type**: [CustomField](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/customfield.htm)
- **Description**: Required for custom objects. On external objects, the name field can instead be specified by setting isNameField to true in the CustomField component. The field that this object's name is stored in. Every custom object must have a name, usually a string or auto number.
    
    Identifier for the custom object record. This name appears in page layouts, related lists, lookup dialogs, search results, and key lists on tab home pages. By default, this field is added to the custom object page layout as a required field.

### pluralLabel

- **Field Type**: string
- **Description**: Plural version of the label value. Custom objects require a plural version of the label to ensure object names are localizable.

### profileSearchLayouts

- **Field Type**: [ProfileSearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_profilesearchlayouts.htm)
- **Description**: Represents a user profile’s search results layouts for an object. With profile-specific layouts, each user profile can have a different search results layout for an object. Available in API version 47.0 and later.

### publishBehavior

- **Field Type**: PlatformEventPublishBehavior ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**: This field applies only to platform events. Indicates when platform event messages are published in a Lightning Platform transaction. This field applies to event messages published through the Lightning Platform, such as Apex, Process Builder, and Flow Builder, but not through Salesforce APIs. If you don’t specify this field, the default value used is PublishImmediately.
    
    This field is available in API version 46.0 and later.
- **Possible values**:
    - PublishAfterCommit—The event message is published only after a transaction commits successfully. If the transaction fails, the event message isn't published.
    - PublishImmediately—The event message is published when the publish call executes, regardless of whether the transaction succeeds.

### recordTypes

- **Field Type**: [RecordType](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_recordtype.htm)\[\]
- **Description**: Array of one or more record types defined for this object.

### recordTypeTrackFeedHistory

- **Field Type**: boolean
- **Description**: Indicates whether the record type is enabled for feed tracking (true) or not (false). To set this field to true, the enableFeeds field on the associated CustomObject must also be true. For more information, see [Customize Chatter Feed Tracking](https://help.salesforce.com/s/articleView?id=experience.collab_feed_tracking.htm&type=5&language=en_US). This field is available in API version 19.0 and later.

### recordTypeTrackHistory

- **Field Type**: boolean
- **Description**: Indicates whether history tracking is enabled for this record type (true) or not (false). To set recordTypeTrackHistory to true, the enableHistory field on the associated custom object must also be true. This field is available in API version 19.0 and later.

### searchLayouts

- **Field Type**: [SearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_searchlayouts.htm)
- **Description**: Search Layouts related list information for the object.

### sharingModel

- **Field Type**: SharingModel([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**: Indicates the org-wide defaults for the object. **Note:** In API version 29.0 and earlier, this field is read only and can’t be set using the Metadata API; you must use the Salesforce user interface. In API version 30.0 and later, you can set this field for internal users using the API and the Salesforce user interface.

### sharingReasons

- **Field Type**: [SharingReason](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_apexsharingreason.htm)\[\]
- **Description**: Reasons why the object is being shared.

### sharingRecalculations

- **Field Type**: [SharingRecalculation](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_apexsharingrecalculation.htm)\[\]
- **Description**: List of custom sharing recalculations associated with the object.

### startsWith

- **Field Type**: StartsWith ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string)
- **Description**: Indicates whether the noun starts with a vowel, consonant, or is a special character (true) or not (false). This is used for languages where words need different treatment depending on the first character. Valid values are listed in [StartsWith](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_field_types.htm#startsWith_ul).

### validationRules

- **Field Type**: [ValidationRule](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_validationformulas.htm)\[\]
- **Description**: Array of one or more validation rules on the object.

### visibility

- **Field Type**: SetupObjectVisibility (enumeration of type string)
- **Description**: Visibility of the custom object, custom setting, or custom metadata type.
    
    This field is available in API version 34.0 and later. For custom settings, this field replaces the customSettingsVisibility field.
- **Default value**: Public
- **Possible values**:
    - Public—If the custom object, custom setting, or custom metadata type is packaged, it’s accessible to all subscribing orgs.
    - Protected—If the custom object, custom setting, or custom metadata type is in a managed package, it’s accessible only to the developer org. Subscribing orgs can’t access it.
    - PackageProtected— (Custom metadata type only) It’s only accessible by the custom Apex code in the package. Use this value to secure secrets such as API access keys and security tokens. Available in API version 47.0 and later.

### webLinks

- **Field Type**: [WebLink](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_weblink.htm)\[\]
- **Description**: Array of one or more weblinks defined for the object.

## MktDataModelAttributes

Represents the Data 360 data model object (DMO) attributes for a custom object. This is a Data 360 subtype of CustomObject.

### creationType

- **Field Type**: DefinitionCreationType [enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title)
- **Description**: Indicates how the object was added. In API version 62.0 and later,
- **Possible values**:
    
    - Activation\_Audience
    - Ad\_Audience\_Insights
    - ADG
    - Calculated\_Insight
    - CG\_Audience
    - Chunk
    - Directory\_Table
    - External
    - Problem\_Records
    - Segment\_Membership
    - Semantic
    - Transform
    - Vector\_Embedding
    
    In API version 67.0 and later, additional valid values are:
    
    - Auxiliary
    - Clean\_Room
    - Deletion\_Records

### dataModelTaxonomy

- **Field Type**: string
- **Description**:
    
    Reference to the data model on which the object is based. For a standard Data 360 model, the value must be Reference when creationType is Standard, or View when creationType is Custom.

### description

- **Field Type**: string
- **Description**: Description of the object. Maximum length is 521 characters. This field is available in API version 55.0 and later.

### isEnabled

- **Field Type**: boolean
- **Description**: Indicates whether the DMO is enabled (true) or not (false).

### isSegmentable

- **Field Type**: boolean
- **Description**: Indicates whether you can use the DMO as a target for segmentation (true) or not (false).

### isUsedForMetrics

- **Field Type**: boolean
- **Description**: Indicates whether the DMO is used for metrics (true) or not (false). This field includes additional object attributes that aren't present in the DMO POJO. This field is available in API version 55.0 and later.

### labelOverride

- **Field Type**: string
- **Description**: Custom label that overrides the object’s default display label in the data model. If unspecified, the default label is used. Maximum length is 255 characters. This field is available in API version 66.0 and later.

### masterLabel

- **Field Type**: string
- **Description**: Master label for this component. Maximum length is 40 characters. This field is available in API version 66.0 and later.

### objectCategory

- **Field Type**: string
- **Description**: Object category used for modeling. Valid values are Engagement, Profile, and Other.

### referenceEntityGroup

- **Field Type**: string
- **Description**: Entity group of the object in the reference model. Applied to standard objects.

### referenceEntityName

- **Field Type**: string
- **Description**: Name of the object in the reference model. Applies to standard objects.

### referenceEntitySubjectArea

- **Field Type**: string
- **Description**: Subject area of the object in the reference model. Applies only to standard objects.

## MktDataLakeAttributes

Represents the Data 360 data lake object (DLO) attributes for a custom object. This is a Data 360 subtype of CustomObject. Its components are available in API version 50.0 and later.

### Special Access Rules

You need an org with a Data Cloud license to access this object.

## MktDataLakeAttributes Fields

### creationType

- **Field Type**: DefinitionCreationType [enumeration of type string](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title)
- **Description**: How this object was added.
- **Possible values**:
    
    - Activation\_Audience
    - Bridge
    - Curated
    - Custom
    - Derived
    - Ml\_Prediction
    - Segment\_Membership
    - Standard
    - System
    
    In API version 62.0 and later, additional valid values are:
    
    - Activation\_Audience
    - Ad\_Audience\_Insights
    - ADG
    - Calculated\_Insight
    - CG\_Audience
    - Chunk
    - Directory\_Table
    - External
    - Problem\_Records
    - Segment\_Membership
    - Semantic
    - Transform
    - Vector\_Embedding
    
    In API version 67.0 and later, additional valid values are:
    - Ad\_Audience\_Insights
    - Auxiliary
    - Clean\_Room
    - Deletion\_Records
    - Problem\_Records

### isEnabled

- **Field Type**: boolean
- **Description**: Indicates whether the landing object is enabled (true) or not (false).

### objectCategory

- **Field Type**: string
- **Description**: Object category used for modeling. Valid values are Behavioral, Profile, and Other.

## Declarative Metadata Additional Components

CustomObject definitions can include additional components defined in the custom object for declarative metadata. The following components are defined in the CustomObject:

- [ActionOverride](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/actionoverride.htm)
- [BusinessProcess](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_businessprocess.htm)
- [CompactLayout](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_compactlayout.htm)
- [CustomField](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/customfield.htm)
- [FieldSet](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_fieldset.htm)
- [HistoryRetentionPolicy](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_historyretentionpolicy.htm)
- [ListView](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_listview.htm)
- [RecordType](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_recordtype.htm)
- [SearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_searchlayouts.htm)
- [SharingReason](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_apexsharingreason.htm)
- [SharingRecalculation](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_apexsharingrecalculation.htm)
- [ValidationRule](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_validationformulas.htm)
- [WebLink](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_weblink.htm)

## Declarative Metadata Sample Definition

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <deploymentStatus\>Deployed</deploymentStatus\>
    <description\>test object with one field for eclipse ide testing</description\>
    <fields\>
        <fullName\>Comments\_\_c</fullName\>
        <description\>add your comments about this object here</description\>
        <inlineHelpText\>This field contains comments made about this object</inlineHelpText\>
        <label\>Comments</label\>
        <length\>32000</length\>
        <type\>LongTextArea</type\>
        <visibleLines\>30</visibleLines\>
    </fields\>
    <label\>MyFirstObject</label\>
    <nameField\>
        <label\>MyFirstObject Name</label\>
        <type\>Text</type\>
    </nameField\>
    <pluralLabel\>MyFirstObjects</pluralLabel\>
    <sharingModel\>ReadWrite</sharingModel\>
</CustomObject\>

The following is the metadata definition of an external object for Salesforce Connect.

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionOverrides\>
        <actionName\>CancelEdit</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>Delete</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>Edit</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>Follow</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>List</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>New</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>SaveEdit</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>Tab</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <actionOverrides\>
        <actionName\>View</actionName\>
        <type\>Default</type\>
    </actionOverrides\>
    <deploymentStatus\>InDevelopment</deploymentStatus\>
    <description\>Products</description\>
    <enableFeeds\>false</enableFeeds\>
    <externalDataSource\>OData</externalDataSource\>
    <externalIndexAvailable\>false</externalIndexAvailable\>
    <externalName\>Products</externalName\>
    <fields\>
        <fullName\>DiscontinuedDate\_\_c</fullName\>
        <description\>DiscontinuedDate</description\>
        <externalDeveloperName\>DiscontinuedDate</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>DiscontinuedDate</label\>
        <required\>false</required\>
        <type\>DateTime</type\>
    </fields\>
    <fields\>
        <fullName\>ID\_\_c</fullName\>
        <description\>ID</description\>
        <externalDeveloperName\>ID</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>ID</label\>
        <precision\>18</precision\>
        <required\>false</required\>
        <scale\>0</scale\>
        <type\>Number</type\>
        <unique\>false</unique\>
    </fields\>
    <fields\>
        <fullName\>Name\_\_c</fullName\>
        <description\>Name</description\>
        <externalDeveloperName\>Name</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>Name</label\>
        <length\>128</length\>
        <required\>false</required\>
        <type\>Text</type\>
        <unique\>false</unique\>
    </fields\>
    <fields\>
        <fullName\>Price\_\_c</fullName\>
        <description\>Price</description\>
        <externalDeveloperName\>Price</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>Price</label\>
        <precision\>16</precision\>
        <required\>false</required\>
        <scale\>2</scale\>
        <type\>Number</type\>
        <unique\>false</unique\>
    </fields\>
    <fields\>
        <fullName\>Products\_\_c</fullName\>
        <externalDeveloperName\>Products</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>Products</label\>
        <length\>20</length\>
        <referenceTo\>Products\_\_x</referenceTo\>
        <relationshipLabel\>Products</relationshipLabel\>
        <relationshipName\>Products</relationshipName\>
        <type\>ExternalLookup</type\>
    </fields\>
    <fields\>
        <fullName\>Rating\_\_c</fullName\>
        <description\>Rating</description\>
        <externalDeveloperName\>Rating</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>Rating</label\>
        <precision\>18</precision\>
        <required\>false</required\>
        <scale\>0</scale\>
        <type\>Number</type\>
        <unique\>false</unique\>
    </fields\>
    <fields\>
        <fullName\>ReleaseDate\_\_c</fullName\>
        <description\>ReleaseDate</description\>
        <externalDeveloperName\>ReleaseDate</externalDeveloperName\>
        <externalId\>false</externalId\>
        <isFilteringDisabled\>false</isFilteringDisabled\>
        <isNameField\>false</isNameField\>
        <isSortingDisabled\>false</isSortingDisabled\>
        <label\>ReleaseDate</label\>
        <required\>false</required\>
        <type\>DateTime</type\>
    </fields\>
    <label\>Products</label\>
    <pluralLabel\>Products</pluralLabel\>
    <searchLayouts\>
        <customTabListAdditionalFields\>ExternalId</customTabListAdditionalFields\>
        <lookupDialogsAdditionalFields\>ExternalId</lookupDialogsAdditionalFields\>
        <lookupPhoneDialogsAdditionalFields\>ExternalId</lookupPhoneDialogsAdditionalFields\>
        <searchResultsAdditionalFields\>ExternalId</searchResultsAdditionalFields\>
        <searchResultsAdditionalFields\>DisplayUrl</searchResultsAdditionalFields\>
        <searchResultsAdditionalFields\>ID\_\_c</searchResultsAdditionalFields\>
    </searchLayouts\>
</CustomObject\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file for field sets and record types but not for other components. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").