43
Views
5
Comments
Change production static
Application Type
Reactive
Service Studio Version
11.54.74 (Build 63545)
Platform Version
11.18.1 (Build 37828)

Our app recently went into production and soon after launch we got the request to add an additional static record. I added it both in DEV and PRD to avoid waiting for the next deployment. However, this backfired when I just tried to deploy, since it sees the 2 records (which share the same data) as different. I can't delete it in production since it's used in other entities but I'm not sure how to fix the problem.

The deployment gives the following error: "The primary key value of a record must be unique. Record Dimension.Office conflicts with a value existing on the database. Use import to recover the record or use a different value."

2024-08-27 11-35-25
Ajay Anthony

Hello Remco, previously we encountered something similar to this. We tried the following. Since you mannaully created those records OS will consider them as a new ID. 

*Try this in QA first* 

  1. Check if the AutoNumber is set to yes, If yes Note the ID of the all records for the static entity in PROD.
  2. Change it to No and manually enter the same ID number as the value for the ID attribute.
  3. Perform the same in DEV, but the 2 new records created make sure the ID value matches with the PROD. (This is for all the records in the static entity)
  4. try to deploy it now.


2023-12-04 13-42-05
Remco Jacobs

Hi Ajay,

Thanks for your reply but that's not quite our situation. We are using text identifiers for all our statics and I made it so both records in DEV and PRD have the exact same identifier.

Do you by chance know how to fix this too?

2024-08-27 11-35-25
Ajay Anthony

Do you see this error during the deployment stage or at the sateh when you prepare and validate the package?

2024-08-27 11-35-25
Ajay Anthony

You can also refer this post https://www.outsystems.com/forums/discussion/26518/deploying-to-production-duplicate-id-error-with-static-entity/ They have resolved this issue by making changes in the Entity_Records table from the systems module.

Hope this helps

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Yup, code and datamodel changes in production come with costs... best is not to do it..

Can you not propagate the production hotfix back to previous environments in the pipeline?

This process is documented here: https://success.outsystems.com/documentation/11/deploying_apps/apply_a_hotfix/#propagate-the-hotfix


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.