Skip to main content

While generate code group for the defaults in the functionality I get an arror

"Failed to re-generate code group DEFAULTS due to an error caused by control procedure sql_defaults.
The error was: Violation of PRIMARY KEY constraint 'prog_object_pk'. Cannot insert duplicate key in object 'dbo.prog_object'. The duplicate key value is (VRR, 9.50, default_shipping_order).”

 

Also with generate definition we got an error while executing the sql_layouts

 

Hi,

Are you using any SQL-typed Control procedures that could have already add "default_shipping_order” and layouts for objects? 


Thanks for your reply.
No control procedure with such name


It's very likely the control procedure name is not named in Functionality/Control procedures. But there could be another control procedure or dynamic model procedure that creates or already created control procedures with those names.

If re-executing Generate definitions doesn't work, it will be hard to help you with this here on the Community. Could you then file an issue in TCP? We can help you out but we will need to have a copy of the SF to solve it.


I have no access to TCP and my colleague is out of office. I already called Thinkwise, they said to create a topic on the community


I have no access to TCP and my colleague is out of office. I already called Thinkwise, they said to create a topic on the community

Understandable, most of time there are certain errors that can be easily fixed, but in this case it's quite difficult. I will message you privately.


Solved! Multiple objects (Table + report) shared the name name which causes these types of errors.


Wouldn’t it be wonderful if the error contained the duplicate key/entry?


Wouldn’t it be wonderful if the error contained the duplicate key/entry?

We do have Warnings in place to alert the developer of these problems


It always remains a hard decision when to alert someone… at runtime (as in while coding/modelling), during generation or when applying validations. It’s always a good practice to reveal as much information as possible to show the developer/end-user what exactly is the issue and how it can be (re)solved on any given moment something breaks.

 


Reply