ExchangePlansManager.RecordChanges

Syntax:

RecordChanges(<Nodes>, <Data>)

Parameters:

<Nodes> (required)

Type: ExchangePlanRef.; Array.
A single value of ExchangePlanRef. type or an array of such values indicating nodes the registered changes are to be transferred to.

<Data> (optional)

Type: Metadata, Undefined; ObjectDeletion; Number; <Data>.
his parameter value can be a metadata object, an object representing the data stored in the database, such as a document, catalog item, account, constant record manager, register record sets etc., a reference to a database object, as well as Undefined.
If a metadata object is specified, change registration will be performed for all data items related to the specified metadata object. Metadata object must be included in the exchange plans of all nodes specified in the first parameter.
If a reference or an object representing data stored in the database is specified, change registration will be performed only for the specified data. The metadata object corresponding to this data must be included in the exchange plans of all nodes specified in the first parameter.
If ObjectDeletion is specified, change registration is performed for the database object referred to by ObjectDeletion object.
If Undefined is specified, only a single node can be specified in the first parameter. In this case, change registration will be performed for all objects with metadata included in the exchange plan to which the node specified as the first parameter belongs.
For information register records set if recorder is undefined, the total of dimensions included in main filter is used as a key. And if information register is periodical and main filter by period is set on, then key is included in period also.
Default value: Undefined.

Description:

Used to register changes of a data item or a data item group for subsequent selection and transferring changes to one or more exchange plan nodes.

Availability:

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

Example:

// Example 1
Currencies = Metadata.Catalogs.Currencies;
Node = ExchangePlans.EP1.FindByCode("Office");
ExchangePlans.RecordChanges(Node, Currencies);

// Example 2
// For the ExpenseBill documents the registration of changes for a node
// is performed only if node's and bill's warehouses concur with each other

// Select ExpenseBill documents by node warehouse
Query = New Query("SELECT Ref FROM Document.ExpenseBill
                       |WHERE Warehouse = &Warehouse"
);
Query.SetParameter("Warehouse", Node.Warehouse);
Selection = Query.Execute().Choose();
While 
Selection.Next() Do
    // register changes in document for a node 
    ExchangePlans.RecordChanges(Node, Selection.Ref);  
EndDo
;


    

1C:Enterprise Developer's Community