Question

2
Replies
2011
Views
OnkarY33 Member since 2013 17 posts
Infosys
Posted: 3 years ago
Last activity: 3 years ago
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
Share this page LinkedIn