Write Record Smart Service Failure: Unable to write to or delete from the source due to a data integrity violation.

Certified Senior Developer

Hi All,

I recently came across this issue while using the write records smart service to update a single specific column(eg: textCol} for an existing record. I'm using the recordType constructor to specify the primary key value and using a pv value for the other column. So my input to the write records looks something like this: 

{recIdPk = 1, textCol: "newvalue"}

Instead of updating the column (textCol) with the given value for the existing row I get the below error (screen-shot attached).

So from my understanding this error should not be coming becoming as this not null column already has a value both in the db table and the record object and I'm not looking to update that field hence not specfying it in my above recordType constructor.

I have a total of 15 columns in my table of which two columns have a not null constraint and are already populated from a separate location (using write records itself).

I'm only looking to update one specific column value and it's asking me to provide values for the not null columns too.

Any idea as to why this might be happening?

  Discussion posts and replies are publicly visible