Would Refreshing a Sandbox Wipe Out Certain Metadata?












1















If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated?



I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.










share|improve this question


















  • 1





    Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

    – Programmatic
    8 hours ago
















1















If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated?



I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.










share|improve this question


















  • 1





    Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

    – Programmatic
    8 hours ago














1












1








1








If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated?



I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.










share|improve this question














If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated?



I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.







customsetting custom-metadata sandbox-refresh sandboxpostcopy






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 10 hours ago









Gabriel RiveraGabriel Rivera

419113




419113








  • 1





    Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

    – Programmatic
    8 hours ago














  • 1





    Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

    – Programmatic
    8 hours ago








1




1





Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

– Programmatic
8 hours ago





Source control, source control, source control. You can back up all your metadata, perform a refresh of data, and redeploy your stashed changes.

– Programmatic
8 hours ago










2 Answers
2






active

oldest

votes


















3














Yes. All of the customizations in your sandbox will be lost:




When you’re finished with a sandbox, you can refresh it. This process replaces the current sandbox with a new copy of your production org.




All metadata customizations will be replaced with a copy of your production Salesforce instance. Data will be copied if applicable for the sandbox type, but any data existing in the sandbox will not be preserved.



Custom Settings and Custom Metadata are copied from Production upon refresh, regardless of sandbox type.






share|improve this answer































    2














    On top of David's answer, wanted to provide some information around your question:




    I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.




    With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.



    For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.



    Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "459"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f250889%2fwould-refreshing-a-sandbox-wipe-out-certain-metadata%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      3














      Yes. All of the customizations in your sandbox will be lost:




      When you’re finished with a sandbox, you can refresh it. This process replaces the current sandbox with a new copy of your production org.




      All metadata customizations will be replaced with a copy of your production Salesforce instance. Data will be copied if applicable for the sandbox type, but any data existing in the sandbox will not be preserved.



      Custom Settings and Custom Metadata are copied from Production upon refresh, regardless of sandbox type.






      share|improve this answer




























        3














        Yes. All of the customizations in your sandbox will be lost:




        When you’re finished with a sandbox, you can refresh it. This process replaces the current sandbox with a new copy of your production org.




        All metadata customizations will be replaced with a copy of your production Salesforce instance. Data will be copied if applicable for the sandbox type, but any data existing in the sandbox will not be preserved.



        Custom Settings and Custom Metadata are copied from Production upon refresh, regardless of sandbox type.






        share|improve this answer


























          3












          3








          3







          Yes. All of the customizations in your sandbox will be lost:




          When you’re finished with a sandbox, you can refresh it. This process replaces the current sandbox with a new copy of your production org.




          All metadata customizations will be replaced with a copy of your production Salesforce instance. Data will be copied if applicable for the sandbox type, but any data existing in the sandbox will not be preserved.



          Custom Settings and Custom Metadata are copied from Production upon refresh, regardless of sandbox type.






          share|improve this answer













          Yes. All of the customizations in your sandbox will be lost:




          When you’re finished with a sandbox, you can refresh it. This process replaces the current sandbox with a new copy of your production org.




          All metadata customizations will be replaced with a copy of your production Salesforce instance. Data will be copied if applicable for the sandbox type, but any data existing in the sandbox will not be preserved.



          Custom Settings and Custom Metadata are copied from Production upon refresh, regardless of sandbox type.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 10 hours ago









          David ReedDavid Reed

          35.4k72053




          35.4k72053

























              2














              On top of David's answer, wanted to provide some information around your question:




              I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.




              With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.



              For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.



              Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.






              share|improve this answer




























                2














                On top of David's answer, wanted to provide some information around your question:




                I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.




                With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.



                For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.



                Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.






                share|improve this answer


























                  2












                  2








                  2







                  On top of David's answer, wanted to provide some information around your question:




                  I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.




                  With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.



                  For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.



                  Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.






                  share|improve this answer













                  On top of David's answer, wanted to provide some information around your question:




                  I'm working on a sandbox-refresh script and trying to determine how to handle custom settings that are in the sandbox but not in production.




                  With any refresh as David has highlighted, you necessarily get a replica of Production for metadata (and data if it's a partial or full copy sandbox) configurations. This would mean that you will lose all your changes in the Sandbox which are not yet migrated to Production.



                  For your scenario, you will need to make sure that your Custom Settings are stored as metadata say in source repository. Because you will only be able to store the metadata, you will also need to ensure that the data contained in Custom Settings are also preserved.



                  Then once you have refreshed your Sandbox from Production, you can then write the script to migrate those Custom Setting and the related data in your new Sandbox.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 9 hours ago









                  Jayant DasJayant Das

                  14.8k2824




                  14.8k2824






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Salesforce Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f250889%2fwould-refreshing-a-sandbox-wipe-out-certain-metadata%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Magento 2 controller redirect on button click in phtml file

                      Polycentropodidae