GET v1/opportunities/{id}/custom-fields

Gets list of custom fields for the opportunity specified by opportunity id

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

Provide opportunity id to get custom fields. Use id = 0 to get list of custom fields for the entity.

integer

Required

Body Parameters

None.

Response Information

Resource Description

Collection of CustomField
NameDescriptionTypeAdditional information
Id

Id of custom field.

integer

Required

Name

Name of the custom field.

string

Read Only

FieldType

Defines custom field data type.

IdNamePair

Read Only

SourceId

Data source of the custom field when the field type is Custom List or Existing List. Example: If the field type is Existing List, SourceId = 4 means the data source of the field is Employees.

integer

Read Only

Value

Represents the value of Custom Field

string

None.

ValueText

Represents the text value of the custom field. Example: If the field type is Existing List and the source is Employee (SourceId = 4) then ValueText will be the employee's name.

string

None.

IsRequired

Defines if the custom field is a required field.

boolean

Read Only

Response Formats

application/json, text/json

Sample:
[
  {
    "id": 1,
    "name": "sample string 2",
    "fieldType": {
      "id": 1,
      "name": "sample string 2"
    },
    "sourceId": 3,
    "value": "sample string 4",
    "valueText": "sample string 5",
    "isRequired": true
  },
  {
    "id": 1,
    "name": "sample string 2",
    "fieldType": {
      "id": 1,
      "name": "sample string 2"
    },
    "sourceId": 3,
    "value": "sample string 4",
    "valueText": "sample string 5",
    "isRequired": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfCustomField xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Core">
  <CustomField>
    <FieldType xmlns:d3p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
      <d3p1:_x003C_Id_x003E_k__BackingField>1</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Name_x003E_k__BackingField>sample string 2</d3p1:_x003C_Name_x003E_k__BackingField>
    </FieldType>
    <Id>1</Id>
    <IsRequired>true</IsRequired>
    <Name>sample string 2</Name>
    <SourceId>3</SourceId>
    <Value>sample string 4</Value>
    <ValueText>sample string 5</ValueText>
  </CustomField>
  <CustomField>
    <FieldType xmlns:d3p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
      <d3p1:_x003C_Id_x003E_k__BackingField>1</d3p1:_x003C_Id_x003E_k__BackingField>
      <d3p1:_x003C_Name_x003E_k__BackingField>sample string 2</d3p1:_x003C_Name_x003E_k__BackingField>
    </FieldType>
    <Id>1</Id>
    <IsRequired>true</IsRequired>
    <Name>sample string 2</Name>
    <SourceId>3</SourceId>
    <Value>sample string 4</Value>
    <ValueText>sample string 5</ValueText>
  </CustomField>
</ArrayOfCustomField>