Modify

Updates an object.

Syntax

            <Modify type="ObjectType" attr_name1="attr_value1" attr_name2="attr_value2">
   <ObjectType>
      <property1>value1</property1>
      <property2>value2</property2>
        ... 
   </ObjectType>
</Modify> 

          

Usage

Use the Modify command to update an object. The maximum number of objects you can add or update with one XML API call is 1,000.

You can use the Modify command to update a User object. See the object reference for usage limitations specific to the User object.

Determine the internal ID of each object you want to update and pass the object containing the object internal ID and the object properties you want to update.

You can set custom field values as well as standard field values when updating objects.

You can look up associated objects using an external ID or name as foreign key instead of passing the associated object internal ID. See Related Object Lookup Using the XML API.

Attributes

Attribute

Usage

enable_custom

— Set the enable_custom attribute to 1 to include custom field values in the argument object properties inline with standard object properties. Object property names for custom fields include the custom field name as defined in OpenAir followed by two underscores and the letter c: custom_field_name__c.

method

Set the method attribute to custom equal to to update a custom field value.

                      <Modify type="ObjectType" method="custom equal to">
   <ObjectType> 
      <id>X</id>
      <custom_field>custom_field_name</custom_field>
      <value>custom_field_value</value>
   </ObjectType>
</Modify> 

                    
Note:

You should use the enable_custom to modify custom field values inline with standard object properties in the argument object instead of using the custom equal to method.

Arguments

Name

Type

Description

ObjectType

Object

The object to add or update.

Response

ObjectType — The updated object with all properties including the object internal ID [id], and date updated timestamp [updated].

Sample Codes

The following example marks a charge as exported:

            <Modify type="ImportExport"> 
   <ImportExport> 
      <application>MyAppName</application> 
      <type>Slip</type> 
      <id>10158</id> 
      <exported> 
         <Date> 
            <year>2023</year> 
            <month>03</month> 
            <day>14</day> 
            <hour>11<hour/> 
            <minute>25<minute/> 
            <second>15<second/> 
         </Date> 
      </exported> 
   </ImportExport>
</Modify> 

          

The following example updates the name and the value of custom field my_custom_field for a customer:

            <Modify type="Customer" enable_custom="1"> 
   <ImportExport> 
      <name>Example Customer</name> 
      <my_custom_field__c>123456789</my_custom_field>  
   </Customer>
</Modify> 

          

Updating Company Logos

Note:

The following information is subject to change without prior notice.

You can use the Modify command to update the company logos. This is equivalent to changing the company logos on the Administration > Global Settings > Display > Logos: UI: Documents in the OpenAir UI – see Logos: UI, documents. To do so, use the object type Logo. Attributes, if passed, have no impact.

A successful request returns the updated Logo object.

A Logo object has the following properties:

Name

Description

name

The name determines which logo will be updated. Possible values:

  • banner_logo – Logo displayed on OpenAir HTML documents.

  • html_logo – Logo displayed on OpenAir PDF documents.

  • pdf_logo– Company pictogram displayed in the upper left corner of the OpenAir UI .

type

[Read-only] – The file type calculated from the binary property value. A successful command returns a Logo object and includes the calculated file type.

filename

The filename. Used for display purposes only.

binary

Base 64 encoded binary data of the company logo file.