Description
This method removes an existing custom field.
Arguments
Field | Description | Field Type | Required | Example |
---|---|---|---|---|
id | The ID number of the custom field to be deleted. The ID number is returned in the response XML message from the account.addCustomField method call.Use the account.getCustomFields method to retrieve the full set of custom fields created for your account. You can also find the ID number of a specific custom field within the application by logging into the application and navigating to Administration > Account and Segment IDs and then scrolling down to the Custom Fields section. |
number | Yes | 52343 |
Response
Field | Description | Example |
---|---|---|
responseCode | A code indicating either success or failure of the operation. (see Error Codes below) | 150 |
responseText | Human readable description of the response code | this custom field has been removed |
id | The ID number of the custom field being removed as provided by the input XML message. | 52343 |
Response Codes
Error Condition | responseCode | responseText |
---|---|---|
Invalid custom field ID number. Either the ID number does not exist or the value passed for the <id> element is not a number | 141 | action not taken, invalid field id |
Successful operation | 150 | this custom field has been removed |
Example Post
<methodCall>
<methodname>account.removeCustomField</methodname>
<id>52343</id>
</methodCall>
Example Response
<methodName><![CDATA[account.removeCustomField]]></methodName>
<responseCode><![CDATA[150]]></responseCode>
<responseText><![CDATA[this custom field has been removed]]></responseText>
<responseData>
<id><![CDATA[52343]]></id>
</responseData>
<responseNum><![CDATA[1]]></responseNum>
Example Error
<methodName><![CDATA[account.removeCustomField]]></methodName>
<responseCode><![CDATA[141]]></responseCode>
<responseText><![CDATA[action not taken, invalid field id]]></responseText>
<responseData>
<id><![CDATA[52343]]></id>
<name></name>
<type></type>
<format></format>
<display_on_survey></display_on_survey>
</responseData>
<responseNum><![CDATA[1]]></responseNum>