# C1.Data.Transactions.ClientTransaction.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Data_Transactions_ClientTransaction__ctor_" data-uid="C1.Data.Transactions.ClientTransaction.#ctor*">ClientTransaction Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Data_Transactions_ClientTransaction__ctor_" data-uid="C1.Data.Transactions.ClientTransaction.#ctor*"></a>
<h4 id="C1_Data_Transactions_ClientTransaction__ctor_C1_Data_Transactions_ClientTransaction_" data-uid="C1.Data.Transactions.ClientTransaction.#ctor(C1.Data.Transactions.ClientTransaction)">ClientTransaction(ClientTransaction)</h4>
<div class="markdown level1 summary"><p>Initializes a child (nested) transaction, a new instance of the <a class="xref" href="C1.Data.Transactions.ClientTransaction.html">ClientTransaction</a> class
with a specified parent transaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public ClientTransaction(ClientTransaction parent)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(parent As ClientTransaction)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Data.Transactions.ClientTransaction.html">ClientTransaction</a></td>
      <td><span class="parametername">parent</span></td>
      <td><p>The parent transaction. Cannot be null.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Data_Transactions_ClientTransaction__ctor_C1_Data_Transactions_ClientTransaction__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>A child transaction is automatically committed/rolled back if its parent transaction is committed/rolled back.</p>
Create a child transaction in cases where you need to open a new window for editing a 
portion of data that is being editing in an already open transaction.
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>The <code class="paramref">parent</code> is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
