68
Views
7
Comments
Why does my Project work in my testing Environment but NOT in Official Environment?
Application Type
Traditional Web
Service Studio Version
11.0.406.0

I have a project of which I publish from Environment A to Environment B with no change to the code at all it's just a push from one to the other. The code works fine in Environment A but when I use it in Environment B unexplainable issues occur.  

Example)

I pass a ID variable to another page and this page should pull up the information using an aggregate filtered out by that ID and display the information inside of a form. 

This worked in Environment A but in Environment B which has the same code it does not work. It pulls the same ID but all the information is wrong. 


Please Help.

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

when you deploy an application from one environment to another environment it does not bring data from one environment to another.  You have to write a logic to copy the data

If you want to copy data from one server to the other, you can use some methods like - Bootstrapping data from excel, using database scripts to copy data, using third-party tools to move data between databases, etc.

Make sure you have not used any hardcoded values, because in the test environment, it will change for example, Your static entity Identifier will change in diff environment. So avoid hardcoding something like ID's. if you have assigned something like EmployeeId = 1 , which belongs to a record Paul, In test environment or any other environment it may belong to different Id , that's the reason you may get incorrect data.

Thanks
Tousif Khan

UserImage.jpg
Pedro Torres

-So Environment A has it's own data and B has it's own data both pulling from their own external tables. The IDs are different so I'm expecting different data but that data is incorrect it's as if it deletes the data that was previously held in that ID the second I open it.

-No values have been hardcoded

2023-10-21 19-42-11
Tousif Khan
Champion

So, If you are using External DB, So you have a different DB for both the env right?
Now check in your database whether the data is correctly mapped or not,

Also check whether the data you are pulling, Joins have been applied correctly, I guess the issue is with data only, try creating some test pages and fetch data one at env A and one at env B and compare both the data.  let's see if it fetches the correct data or not.
Also, check data at your External Db as well. there might be some mapping issue I guess.
If you add some snapshot or something that might also help to visualise the issue.
Thanks

2023-01-26 16-03-24
Ana Agostinho

Hello Pedro Torres,

I'm trying to mitigate some possibilities for this issue.

Are you trying to pass the ID of a static entity? Is the entity identifier set to "auto-number"? Using auto-number is not recommended as it may cause problems in complex scenarios. Using IDs that are not auto-numbered could solve this problem (if that is the case, of course).

Also, are you trying to use "hard-coded" IDs? If not, could you provide more details about your problem? For example, some prints/images might help people understand your issue.

Anyway, were you able to use the debugger in both environments and check what was happening?

Best regards, 

Ana

UserImage.jpg
Pedro Torres

It's not of a static entity say I'm on a page with a list of movies and I click on one movie and see it's detail I can see all the actors attached to that movie each actor having their own Actor ID. but if I click on that actor all the actor information gets replaced with random information and attaches itself to another movie (If i were to hit save). If I go back to the movie detail screen without saving I can see that the correct actors are still there. I pass the Actor ID to the Actor detail Page. 

-And nothing is hardcoded.

-and in the debugger in Environment A it goes as expected pulling all the information of the actor by the actor ID and the information is the correct information tied to that actor. but in Environment B it pulls that Actor ID but all the information is wrong or maybe gets replaced on display because if i don't hit save nothing is wrong. 


-So Environment A has it's own data and B has it's own data both pulling from their own external tables. The IDs are different so I'm expecting different data but that data is incorrect it's as if it deletes the data that was previously held in that ID the second I open it.

2023-01-26 16-03-24
Ana Agostinho

I totally support the message from @Tousif Khan. It most probabily is a data issue. 

Best regards, 

Ana 

UserImage.jpg
Raj Sharma

Extract the SQL query from the aggregate run it manually on DEV environment and on QA environment using Advance SQL or SQL Developer builder. This is the only way to confirm the Data issue. Here @Tousif Khan can be right if you have same code base then definitely it will be Data issue, but better it to confirm by executing the query manually on both environment.

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