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
Air FoxxAir Foxx 

changing class in production

I'm not a developer, but I inherited a class from a prior developer that needs a minor tweak to the production code. I've made the change in the sandbox code, but can't deploy to prod because of coverage issues that were apparently not worked out by the prior developer. Based on what I've read, it appears that the best approach is to refresh the sandbox, try to increase coverage and try to deploy again. Two questions:

1) What happens when a developer sandbox is refreshed - is data deleted or is the metadata changed to match the prod environment while data is maintained?
2) Is there a way to backup the sandbox before refreshing?

Any help would be appreciated.
Thanks.
 
Prabhat Kumar12Prabhat Kumar12
Hi Air,

When you refresh the Sandbox all data would be deleted and the replica of your production will be created. For example if you have created object, class, trigger, workflow which is in only sandbox will be deleted.

You can take back of your sandbox thorugh data loader. Save all your data in a excel file and once you refeshed the sandbox you can upload it back.

You can check if you have available sandbox is greater than 0 then you can create new one.

Hope this will help !!
Ketankumar PatelKetankumar Patel
1) What happens when a developer sandbox is refreshed - is data deleted or is the metadata changed to match the prod environment while data is maintained? Both for dev sandbox data will be deleted and you will not have any data for dev sandbox and metadata will be matched with prod enviornment, if you have full or partial then you will get data from prod. 

2) Is there a way to backup the sandbox before refreshing? - Yes you can backup metadata using ANT tool and data using dataloder or if you just have one or two apex classes changed then you can copy those using notepade and then refresh sandbox and then again paste your copied classes.