<turbo-stream action="update" target="wiki_card"><template>

<h1>SQL Identity Insert Error</h1>
<div class="trix-content"><p>The below error appears when SQL Server blocks an insert because your integration is trying to set a value for a column that is marked as <strong>IDENTITY</strong> (auto-increment). By default, SQL generates values for these columns and does not allow you to provide them unless you explicitly enable <code>IDENTITY_INSERT</code>.<br><br><code>Cannot insert explicit value for identity column in table 'XYZ' when IDENTITY_INSERT is set to OFF.</code></p><p>The steps below explain what the error means, why it happens, and how to fix it safely.<br><br></p><p>1.<strong> Option A – Do not insert into the identity column (Recommended in most cases)</strong></p><ul><li>Remove that column from the insert payload.</li><li>SQL Server will assign the value automatically.</li></ul><p><br></p><p>2. <strong>Option B – Advanced (if you must control the ID)</strong></p><ul><li>Temporarily allow manual inserts by enabling <code>IDENTITY_INSERT</code>.</li></ul><p><strong>Manual SQL</strong></p><p><code>SET IDENTITY_INSERT dbo.MyTable ON;<br>INSERT INTO dbo.MyTable (IdentityCol, ColA, ColB)<br>VALUES (123, 'Value1', 'Value2');<br>SET IDENTITY_INSERT dbo.MyTable OFF;<br></code><br><br>3. <strong>Option C - Rapidi (integration scenario)</strong></p><ul><li>Use <strong>Destination Pre Execution </strong>( Go to the transfer that needs this setup and expand the <strong>Triggers</strong> section -&gt; populate the field <strong>Destination Pre Execution</strong> with the below information:&nbsp;</li></ul><p><code>SET IDENTITY_INSERT [dbo].[%%COMPANYNAME%$Price List Line$&lt;GUID&gt;] OFF</code></p><p>Click on <strong>Activate Changes</strong> and run again the transfer. All records should be transferred without any issues.&nbsp;</p></div>
</template></turbo-stream>

