Search
K

SetMultipleCustomFieldValues

Description

Sets multiple custom field values in one operation. Values will be validated according to the field datatypes. The field values are set as a non-atomic operation. That means, if fields A & B are set and field C fails, fields A & B will retain their updated values, while field C will remain unaffected. Likewise, if we’re setting fields A, B & C and field B fails, execution will stop there, meaning field C will not have it’s value set. Fields will be processed from top to bottom according to the input format. If a failure occurs, the operation can be run again with correct values. There is no harm in setting a fields value several times with the same value.

Parameters

Name
Value
paperID
The ID of the iPaper to set values on
fieldsXml
The field configuration XML that defines the values to set. Sample:
<fields>
<field name="ModelName">Test</field>
<field name="ModelYear">1995</field>
</fields>

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<result>
<code><![CDATA[SUCCESS]]></ code>
<message><![CDATA[Custom field values set.]]></message>
</result>

Sample Error Response

If an error occurs in one of the field operations, the field name will be included in the data section.
<?xml version="1.0" encoding="utf-8"?>
<result>
<code><![CDATA[CUSTOMFIELD_FIELD_DOES_NOT_EXIST]]></ code>
<message><![CDATA[Field 'TestxField' does not exist.]]></message>
<data>
<field name="TestxField" />
</data>
</result>

Return Codes

  • SUCCESS
  • ERROR
  • READONLY
  • LOGIN_SECURITY_VIOLATION
  • CUSTOMFIELD_FIELD_DOES_NOT_EXIST
  • PAPER_DOES_NOT_EXIST
  • PAPER_MUST_NOT_BE_CATEGORY
  • CUSTOMFIELD_INVALID_DATA_FORMAT