function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nikhil SagarNikhil Sagar 

I have the same code in production and sandbox, In Production it is working fine, But in sandbox it is not working fine, But both the codes are same, Can anyone suggest what we can do on this?...

Best Answer chosen by Nikhil Sagar
ankit bansalankit bansal
Hi Nikhil,
You can take some steps to debug this behavior-
1. If you have a full copy sandbox try to run your code on the exact same record, this will help you in triaging the issue.
2. If the code is same please see if your code is dependent on some configuration like custom setting, custom metdata, labels, static resource. It is possible there are some differences for these configration between sandbox and production.
3. Please check the version of the classes, lwc and aura components. It is possible the components are on different versions in sandbox and production.
4. See which release is present in your sandbox and production , it is possible that they are on different releases which is causing some of your code to malfunction.
 

All Answers

ankit bansalankit bansal
Hi Nikhil,
You can take some steps to debug this behavior-
1. If you have a full copy sandbox try to run your code on the exact same record, this will help you in triaging the issue.
2. If the code is same please see if your code is dependent on some configuration like custom setting, custom metdata, labels, static resource. It is possible there are some differences for these configration between sandbox and production.
3. Please check the version of the classes, lwc and aura components. It is possible the components are on different versions in sandbox and production.
4. See which release is present in your sandbox and production , it is possible that they are on different releases which is causing some of your code to malfunction.
 
This was selected as the best answer
Nikhil SagarNikhil Sagar
Thanks Ankit., These points helped me..