Solved

TSF Error generate code group

  • 17 September 2021
  • 9 replies
  • 89 views

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

 

icon

Best answer by Mark Jongeling 17 September 2021, 14:14

View original

9 replies

Userlevel 7
Badge +23

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

Userlevel 7
Badge +23

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

Userlevel 7
Badge +23

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.

Userlevel 7
Badge +23

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

Userlevel 3
Badge +8

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

Userlevel 7
Badge +23

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

Userlevel 3
Badge +8

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