type CustomField (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
Service
CustomFieldService
An additional, user-created field on an entity.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202408
Field
|
id
|
xsd:long
Unique ID of the CustomField . This value is readonly and is assigned by Google.
|
name
|
xsd:string
Name of the CustomField . This is value is required to create a custom field. The max
length is 127 characters.
|
description
|
xsd:string
A description of the custom field. This value is optional. The maximum length is 511 characters
|
isActive
|
xsd:boolean
Specifies whether or not the custom fields is active. This attribute is read-only.
|
entityType
|
CustomFieldEntityType
The type of entity that this custom field is associated with. This attribute is read-only if
there exists a CustomFieldValue for this field.
Enumerations
-
LINE_ITEM
- Represents the LineItem type.
-
ORDER
- Represents the Order type.
-
CREATIVE
- Represents the Creative type.
-
PROPOSAL
- Represents the Proposal type.
-
PROPOSAL_LINE_ITEM
- Represents the ProposalLineItem type.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
|
dataType
|
CustomFieldDataType
The type of data this custom field contains. This attribute is read-only if there exists a
CustomFieldValue for this field.
Enumerations
-
STRING
- A string field. The max length is 255 characters.
-
NUMBER
- A number field.
-
TOGGLE
- A boolean field. Values may be "true", "false",
or empty.
-
DROP_DOWN
- A drop-down field. Values may only be the ids
of CustomFieldOption objects.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
|
visibility
|
CustomFieldVisibility
How visible/accessible this field is in the UI.
Enumerations
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
-
API_ONLY
- Only visible through the API.
-
READ_ONLY
- Visible in the UI, but only editable through the API
-
FULL
- Visible and editable both in the API and the UI.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003eCustomField is an additional, user-created field on an entity and contains fields such as \u003ccode\u003eid\u003c/code\u003e, \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e, \u003ccode\u003eisActive\u003c/code\u003e, \u003ccode\u003eentityType\u003c/code\u003e, \u003ccode\u003edataType\u003c/code\u003e, and \u003ccode\u003evisibility\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCustomField\u003c/code\u003e objects can be created and updated using the \u003ccode\u003ecreateCustomFields()\u003c/code\u003e and \u003ccode\u003eupdateCustomFields()\u003c/code\u003e methods of the \u003ccode\u003eCustomFieldService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCustomField\u003c/code\u003e entity can be associated with other entities like \u003ccode\u003eLineItem\u003c/code\u003e, \u003ccode\u003eOrder\u003c/code\u003e, \u003ccode\u003eCreative\u003c/code\u003e, \u003ccode\u003eProposal\u003c/code\u003e, and \u003ccode\u003eProposalLineItem\u003c/code\u003e using the \u003ccode\u003eentityType\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCustomField\u003c/code\u003e supports various data types including \u003ccode\u003eSTRING\u003c/code\u003e, \u003ccode\u003eNUMBER\u003c/code\u003e, \u003ccode\u003eTOGGLE\u003c/code\u003e, and \u003ccode\u003eDROP_DOWN\u003c/code\u003e using the \u003ccode\u003edataType\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCustomField\u003c/code\u003e visibility can be controlled using the \u003ccode\u003evisibility\u003c/code\u003e field, allowing it to be \u003ccode\u003eAPI_ONLY\u003c/code\u003e, \u003ccode\u003eREAD_ONLY\u003c/code\u003e, or \u003ccode\u003eFULL\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `CustomFieldService` allows for the creation and updating of custom fields (`CustomFieldPage`). A `CustomField` is a user-defined field on an entity, with properties like `id`, `name`, `description`, and `isActive`. The `entityType` defines the associated entity (e.g., `LINE_ITEM`, `ORDER`), `dataType` specifies the type of data stored (e.g., `STRING`, `NUMBER`), and `visibility` determines its accessibility (e.g., `API_ONLY`, `FULL`). `DropDownCustomField` is a specific type of custom field.\n"],null,["# type CustomField (v202408)\n\n**Service** \n**CustomFieldService** **Dependencies** \n[CustomFieldPage](/ad-manager/api/reference/v202408/CustomFieldService.CustomFieldPage) [createCustomFields()](/ad-manager/api/reference/v202408/CustomFieldService#createCustomFields) [updateCustomFields()](/ad-manager/api/reference/v202408/CustomFieldService#updateCustomFields) \n▼\n**CustomField** **Inheritance** \n**CustomField** \n▼\n[DropDownCustomField](/ad-manager/api/reference/v202408/CustomFieldService.DropDownCustomField)\n\nAn additional, user-created field on an entity.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `id` | ` `xsd:`long` Unique ID of the `CustomField`. This value is readonly and is assigned by Google. |\n| ### `name` | ` `xsd:`string` Name of the `CustomField`. This is value is required to create a custom field. The max length is 127 characters. |\n| ### `description` | ` `xsd:`string` A description of the custom field. This value is optional. The maximum length is 511 characters |\n| ### `isActive` | ` `xsd:`boolean` Specifies whether or not the custom fields is active. This attribute is read-only. |\n| ### `entityType` | ` `[CustomFieldEntityType](/ad-manager/api/reference/v202408/CustomFieldService.CustomFieldEntityType)` ` The type of entity that this custom field is associated with. This attribute is read-only if there exists a [CustomFieldValue](/ad-manager/api/reference/v202408/CreativeService.CustomFieldValue) for this field. *** ** * ** *** **Enumerations** `LINE_ITEM` : Represents the [LineItem](/ad-manager/api/reference/v202408/ForecastService.LineItem) type. `ORDER` : Represents the [Order](/ad-manager/api/reference/v202408/OrderService.Order) type. `CREATIVE` : Represents the [Creative](/ad-manager/api/reference/v202408/CreativeService.Creative) type. `PROPOSAL` : Represents the [Proposal](/ad-manager/api/reference/v202408/ProposalService.Proposal) type. `PROPOSAL_LINE_ITEM` : Represents the [ProposalLineItem](/ad-manager/api/reference/v202408/ForecastService.ProposalLineItem) type. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |\n| ### `dataType` | ` `[CustomFieldDataType](/ad-manager/api/reference/v202408/CustomFieldService.CustomFieldDataType)` ` The type of data this custom field contains. This attribute is read-only if there exists a [CustomFieldValue](/ad-manager/api/reference/v202408/CreativeService.CustomFieldValue) for this field. *** ** * ** *** **Enumerations** `STRING` : A string field. The max length is 255 characters. `NUMBER` : A number field. `TOGGLE` : A boolean field. Values may be \"true\", \"false\", or empty. `DROP_DOWN` : A drop-down field. Values may only be the ids of [CustomFieldOption](/ad-manager/api/reference/v202408/CustomFieldService.CustomFieldOption) objects. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |\n| ### `visibility` | ` `[CustomFieldVisibility](/ad-manager/api/reference/v202408/CustomFieldService.CustomFieldVisibility)` ` How visible/accessible this field is in the UI. *** ** * ** *** **Enumerations** `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. `API_ONLY` : Only visible through the API. `READ_ONLY` : Visible in the UI, but only editable through the API `FULL` : Visible and editable both in the API and the UI. \u003cbr /\u003e |"]]