ExchangePlansManager.DeleteChangeRecords
Syntax:
Parameters:
<Nodes> (required)
A single value of ExchangePlanRef.
<Data> (optional)
This 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 records will be deleted for all data items belonging to the specified metadata object. Metadata object must be included in the exchange plans of all nodes specified in the first parameter.
If ObjectDeletion is specified, change registration record is deleted for a database object referred to by ObjectDeletion object.
If a reference or an object representing data stored in the database is specified, change registration records will be deleted only for the data specified. A metadata object corresponding to the data must be included in all exchange plans of all nodes specified in the first parameter.
If Undefined is specified, only a single node can be specified in the first parameter. In this case, the change registration records will be deleted for all objects with metadata included in the exchange plan to which the node specified in the first parameter belongs.
If a single node is specified in the first parameter, the message number can be used in the parameter. In this case, DeleteChangeRecords method deletes all change registration table records for the specified node which have a message number equal to or less than the value of the second parameter.
Default value: Undefined.
Description:
Availability:
Example:
// Example 1 Cat = Catalogs.Currencies.FindByCode("810"); Node = ExchangePlans.EP1.FindByCode("Office"); ExchangePlans.DeleteChangeRecords(Node, Cat); // Example 2 // Loading from a file // Performing a try to open a file XMLReader = New XMLReader; Try XMLReader.OpenFile(FileName); Except Return; EndTry; ReadingMessage = ExchangePlans.CreateMessageReader(); ReadingMessage.BeginRead(XMLReader); If ReadingMessage.Sender <> Ref Then // Message is not for this node Raise "Wrong node"; EndIf; // Delete registration of changes for the node - message sender ExchangePlans.DeleteChangeRecords(ReadingMessage.Sender, ReadingMessage.ReceivedNo); |