Question

2
Replies
2114
Views
Close popover
Onkar Yerawar (OnkarY33)
Infosys
Onkar Yerawar
Infosys
NL
OnkarY33 Member since 2013 17 posts
Infosys
Posted: October 20, 2017
Last activity: January 5, 2018
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,
Close popover 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.