<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-2299 Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-2299 Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server</link><pubDate>Thu, 21 Mar 2024 19:41:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Current Revision posted to Appian Knowledge Base by Ryan Good on 3/21/2024 7:41:33 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database type is SQL Server, the &lt;a href="https://docs.appian.com/suite/help/latest/Write_Records_Smart_Service.html"&gt;Write Records smart service&lt;/a&gt; will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and &lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an &lt;code&gt;INSERT&lt;/code&gt; vs. an &lt;code&gt;UPDATE&lt;/code&gt; query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server &lt;code&gt;IDENTITY&lt;/code&gt; columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be &lt;code&gt;NULL&lt;/code&gt; in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent &lt;code&gt;NULL&lt;/code&gt; from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Last Reviewed: March 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/11</link><pubDate>Thu, 07 Mar 2024 22:44:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 11 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 10:44:34 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database type is SQL Server, the &lt;a href="https://docs.appian.com/suite/help/latest/Write_Records_Smart_Service.html"&gt;Write Records smart service&lt;/a&gt; will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and &lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an &lt;code&gt;INSERT&lt;/code&gt; vs. an &lt;code&gt;UPDATE&lt;/code&gt; query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server &lt;code&gt;IDENTITY&lt;/code&gt; columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be &lt;code&gt;NULL&lt;/code&gt; in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent &lt;code&gt;NULL&lt;/code&gt; from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Last Reviewed: March 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/10</link><pubDate>Thu, 07 Mar 2024 22:39:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 10 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 10:39:25 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database type is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and &lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an &lt;code&gt;INSERT&lt;/code&gt; vs. an &lt;code&gt;UPDATE&lt;/code&gt; query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server &lt;code&gt;IDENTITY&lt;/code&gt; columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be &lt;code&gt;NULL&lt;/code&gt; in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent &lt;code&gt;NULL&lt;/code&gt; from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Last Reviewed: March 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/9</link><pubDate>Thu, 07 Mar 2024 22:37:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 9 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 10:37:38 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database type is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and &lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an &lt;code&gt;INSERT&lt;/code&gt; vs. an &lt;code&gt;UPDATE&lt;/code&gt; query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/8</link><pubDate>Thu, 07 Mar 2024 20:35:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>Ryan Good</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 8 posted to Appian Knowledge Base by Ryan Good on 3/7/2024 8:35:06 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database type is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and &lt;strong&gt;tomcat-stdOut.log&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/7</link><pubDate>Mon, 26 Feb 2024 18:40:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 7 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 6:40:59 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being explicitly defined as the primary key value in the SAIL code or process model.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/6</link><pubDate>Mon, 26 Feb 2024 17:15:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 6 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 5:15:38 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database.&lt;/p&gt;
&lt;p&gt;As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/5</link><pubDate>Mon, 26 Feb 2024 17:15:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 5 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 5:15:16 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server, the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys. This changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database. As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/4</link><pubDate>Mon, 26 Feb 2024 17:11:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 4 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 5:11:59 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server. the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys, which changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database. As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL code or the process model&lt;/span&gt;. Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/3</link><pubDate>Mon, 26 Feb 2024 17:10:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 3 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 5:10:30 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server. the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys, which changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database. As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails &lt;span&gt;if the primary key is explicitly defined to be NULL in either the SAIL or the process model&lt;/span&gt;. Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>KB-XXXX Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/2</link><pubDate>Mon, 26 Feb 2024 17:07:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 2 posted to Appian Knowledge Base by lyann.sun on 2/26/2024 5:07:37 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server. the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history and tomcat-stdOut.log:&lt;/p&gt;
&lt;pre&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/pre&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys, which changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database. As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails if the primary key is null. Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Write Records smart service fails when writing record with null primary key to SQL Server</title><link>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server/revision/1</link><pubDate>Tue, 20 Feb 2024 17:46:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fdaba05a-ab83-4c3a-9926-b695586b1c13</guid><dc:creator>lyann.sun</dc:creator><comments>https://community.appian.com/support/w/kb/3485/kb-2299-write-records-smart-service-fails-when-writing-record-with-null-primary-key-to-sql-server#comments</comments><description>Revision 1 posted to Appian Knowledge Base by lyann.sun on 2/20/2024 5:46:19 PM&lt;br /&gt;
&lt;h2 id="mcetoc_1hn3p40je1"&gt;Symptoms&lt;/h2&gt;
&lt;p&gt;If the target database is SQL Server. the Write Records smart service will fail&amp;nbsp;when writing a new record with a null primary key. The following error will be seen in the process history:&lt;/p&gt;
&lt;p&gt;Unable to write to or delete from the source due to a data integrity violation. &lt;br /&gt;Error Details: Cannot insert the value NULL into column &amp;lt;column&amp;gt;, table &amp;lt;table&amp;gt;; column does not allow nulls. INSERT fails.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3pqblr3"&gt;Cause&lt;/h2&gt;
&lt;p&gt;In 23.4, the Write Records smart service was updated to allow non-nullable foreign keys, which changed how the Write Records smart service decides what needs to be an INSERT vs. an UPDATE query in the database. As a side effect, due to how the SQL Server IDENTITY columns work, the Write Records node fails if the primary key is null. Please note this only applies if it is a SQL Server database.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q08tb5"&gt;Action&lt;/h2&gt;
&lt;p&gt;Update the design to prevent NULL from being defined as the primary key value.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hn3q04h24"&gt;Affected Versions&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 23.4 and later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>