When importing solicit codes into a constituent update batch in an environment on Service Pack 14 or later, you might encounter the error, "Cannot insert the value NULL into column 'CONSENTPREFERENCECODE', table [Database] dbo.BATCHCONSTITUENTSOLICITCODE'; column does not allow nulls. INSERT fails". This error is thrown regardless of whether the solicit code has the consent type "EU Consent".
We are currently evaluating this issue for a fix in a future service pack.
As a work around, add a column to the import file and map it to the Preference field in the Solicit codes collection field; this will allow the solicit codes to be successfully imported. There are 3 valid values for Preference: No response, Opt-out, or Opt-in. Note that Preference is a required field if the Solicit code being imported has the EU Consent consent type. For Solicit codes that do not have the EU Consent type, you will need to import the preference value of No response
Steps to Duplicate
1) Using a constituent update batch, import solicit codes mapped to the Solicit codes collection field. 2) Do not map the Preference field in the collection field. 3) Notice that records are rejected with the error, "Cannot insert the value NULL into column 'CONSENTPREFERENCECODE', table '[Database]dbo.BATCHCONSTITUENTSOLICITCODE'; column does not allow nulls. INSERT fails".