Static Entity Identifier value changed in different environments

Hello ,


Could anyone let me know, can Static entity identifier values changes in different environment (DEV,PROD,QC)

We have come across the issue with static entity when we deploy it from QA to PROD. The identifier values got changed. Which caues a problem where we have used the hard coded values.


Thanks!

Arpita Pancholi

Do you happen to have the Static Entity Identifier with Auto Number as True?

That might cause inconsistencies.

Solution

Hi Arpita,

Yes, the ids of static entities can be different in different environments.

You can use the "Entities" (see below) to assign or compare values of a static entity identifier. This way you can be sure you are always getting the correct Id from the database.

Hope this helps.

Best regards,

Pedro

Solution

Hi Arpita,

Yes, It is possible that the static entity identifier value gets different across various environment (like Dev, Prod...). The reason is that the application residing in different environment access it's own env database server tables and the other reason is that as the Id (PK) attribute is set to auto_number and while flushing the table data if the developer miss to reset the auto_number of the table ID attribute, the Id value will be auto_increment the LastID + 1 while the new record is created during the deployment process.

So as a best practice, avoid using hard-coded values in your code and always refer the Static entity record ID itself wherever you want to refer.


Workaround - If you want the Static Table ID (PK) attribute value to have the same value across various environment even after solution deployment. Just set the Is_AutoNumber entity attribute value to No for the Id (PK) attribute for the static entity and manually assign Id value to each and every defined static record, this is how you can manage a same ID value for every static record across the various environment.

Hope this helps you.


Regards,

Benjith Sam.

Benjith Sam wrote:

Hi Arpita,

Yes, It is possible that the static entity identifier value gets different across various environment (like Dev, Prod...). The reason is that the application residing in different environment access it's own env database server tables and the other reason is that as the Id (PK) attribute is set to auto_number and while flushing the table data if the developer miss to reset the auto_number of the table ID attribute, the Id value will be auto_increment the LastID + 1 while the new record is created during the deployment process.

So as a best practice, avoid using hard-coded values in your code and always refer the Static entity record ID itself wherever you want to refer.


Workaround - If you want the Static Table ID (PK) attribute value to have the same value across various environment even after solution deployment. Just set the Is_AutoNumber entity attribute value to No for the Id (PK) attribute for the static entity and manually assign Id value to each and every defined static record, this is how you can manage a same ID value for every static record across the various environment.

Hope this helps you.


Regards,

Benjith Sam.

Thanks Ben. We will surely implement that.