Skip to main content
Solved

TSF Error generate code group

  • September 17, 2021
  • 9 replies
  • 96 views

Matthijs ter Stege
Apprentice

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

 

Best answer by Mark Jongeling

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

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

9 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • September 17, 2021

Hi,

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


Matthijs ter Stege
Apprentice

Thanks for your reply.
No control procedure with such name


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • September 17, 2021

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.


Matthijs ter Stege
Apprentice

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


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • September 17, 2021
Matthijs ter Stege wrote:

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.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • September 17, 2021

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


Ricky
Superhero
Forum|alt.badge.img+8
  • Superhero
  • 96 replies
  • September 21, 2021

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


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • September 21, 2021
Ricky wrote:

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


Ricky
Superhero
Forum|alt.badge.img+8
  • Superhero
  • 96 replies
  • September 21, 2021

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.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings