> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Commit Method of the VendorRecords Object

This method commits all the changes you made to the vendor records since the previous commit.

You can use this method only if the invoice [**DocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md) has been switched to editing mode by the [**CheckOut**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinitions-checkout.md) method. After one or several calls to this method, use the [**CheckIn**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinitions-checkin.md) method to save all the committed changes to the Document Definition or the [**UndoCheckout**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinitions-undocheckout.md) method to discard all the committed changes.

## Syntax

```vb Visual Basic .NET theme={null}
Function Commit(Callback As ProcessingEvents) As RejectedDatasetRecords
```

```cpp C++ theme={null}
HRESULT Commit(
  IProcessingEvents*        Callback,
  IRejectedDatasetRecords** RejectedRecords
)
```

## Parameters

**Callback**

\[in] Refers to an object implementing the [**IProcessingEvents**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/iprocessingevents.md) interface that will inform the user of the progress and errors that occurred while writing the data to the vendors database, and provide a way to abort the operation. You may pass NULL for this parameter.

**RejectedRecords**

\[out, retval] A pointer to **IRejectedDataSetRecords\*** pointer variable that receives the interface pointer of the output [**RejectedDataSetRecords**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rejecteddatasetrecords.md) object. This object will contain all the vendor records that failed to be written into the database, with error messages explaining the reason for the failure. Each rejected record is represented by a [**RejectedDataSetRecord**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rejecteddatasetrecord.md) object, which may be cast to [**VendorRecord**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/vendorrecord.md) type.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**VendorRecords**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/vendorrecords.md)
