Question

2
Replies
2163
Views
Onkar Yerawar (OnkarY33)
HCL
Onkar Yerawar
HCL
NL
OnkarY33 Member since 2013 17 posts
HCL
Posted: October 20, 2017
Last activity: January 5, 2018
Posted: 20 Oct 2017 5:44 EDT
Last activity: 5 Jan 2018 9:23 EST
Closed
Solved

Obj-Save make an INSERT instead of an UPDATE

Hi,

I have an external class with a primary key. This class has locking enabled and test connectivity also works fine. In an activity I do Obj-Open with the primary key and then update one of the property(non-key) followed by Obj-Save(with Write-Now). The Obj-Save fails with error - "Cannot insert explicit value for identity column in table 'TABLE_NAME' when IDENTITY_INSERT is set to OFF." even though I am not updating key column. If I do not use Write now option in Obj-Save then the Obj-Save does not fail but then the subsequent Commit fails with same error. I suspect Obj-Save is somehow trying Insert instead of Update.

We are using Pega 7.3.0 and the table is in external MS SQL Server database. Any help would be great. Kindly let me know in case more details are needed.

Best regards,

Onkar

Low-Code App Development
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.