> ## 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.

# BusinessUnitRecords オブジェクトの Commit メソッド

このメソッドは、前回のコミット以降に事業部門のレコードに対して行ったすべての変更をコミットします。

このメソッドは、請求書の [**DocumentDefinition**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinition.md) が [**CheckOut**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkout.md) メソッドによって編集モードに切り替えられている場合にのみ使用できます。このメソッドを 1 回以上呼び出した後、コミットした変更をすべて Document Definition に保存するには [**CheckIn**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-checkin.md) メソッドを、コミットした変更をすべて破棄するには [**UndoCheckout**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documentdefinitions-undocheckout.md) メソッドを使用します。

## 構文

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

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

## パラメーター

**Callback**

\[in] [**IProcessingEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/iprocessingevents.md) インターフェイスを実装するオブジェクトを参照します。このオブジェクトは、事業部門データベースへのデータ書き込み中の進行状況と発生したエラーをユーザーに通知し、操作を中止する手段を提供します。このパラメーターには NULL を渡すこともできます。

**RejectedRecords**

\[out, retval] 出力される [**RejectedDataSetRecords**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/rejecteddatasetrecords.md) オブジェクトのインターフェースポインターを受け取る **IRejectedDataSetRecords**\* ポインター変数へのポインター。このオブジェクトには、データベースへの書き込みに失敗したすべての事業部門レコードが、失敗の理由を示すエラー メッセージとともに格納されます。却下された各レコードは [**RejectedDataSetRecord**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/rejecteddatasetrecord.md) オブジェクトで表され、[**BusinessUnitRecord**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/businessunitrecord.md) 型にキャストできます。

## 戻り値

このメソッドに固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 関連項目

[**BusinessUnitRecords**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/businessunitrecords.md)
