XDTODataObject.Add

Syntax variant: Setting a value of a new custom property

Syntax:

Add(<Form>, <NamespaceURI>, <LocalName>, <DataElement>)

Parameters:

<Form> (required)

Type: XMLForm.
Form of XML presentation of a custom property. Can have values Element or Attribute.

<NamespaceURI> (required)

Type: String.
Namespace URI of XML presentation of custom property.

<LocalName> (required)

Type: String.
Local name of a custom property.

<DataElement> (required)

Type: XDTODataValue; XDTODataObject.
XDTO data element (value or object), that is a value of a custom property.

Description of method variant:

Property name will be created automatically, based on the local name of XML property presentation. In case a custom property with the received name already exists and, if previous value setting of a custom property was performed for this custom property or for another property if a sequence is present, - the property will be listed with unlimited top boundary. Otherwise an exception will be initiated. Type of created property is always set as anyType XML schema namespace.

Syntax variant: Setting a value of existing custom property

Syntax:

Add(<Name>, <DataElement>)

Parameters:

<Name> (required)

Type: String.
Name of a custom property.

<DataElement> (required)

Type: XDTODataValue; XDTODataObject.
XDTO data element (value or object), that is a value of a custom property.

Description of method variant:

If a property with the specified name does not exist, exclusion will be initiated.
In case a previous setting of a custom property value was performed for this custom property, or for another property if a sequence is present, - the property will be listed with unlimited top boundary.
Otherwise an exception will be initiated.

Description:

Adds a value of a custom property.

Availability:

Thin client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Note:

Method can be called only for the object types with set Open property, otherwise an exception will be initialized.

    

1C:Enterprise Developer's Community