Deployments in Salesforce: Sandbox and Metadata Migrations

Deployments in Salesforce: Sandbox and Metadata Migrations

In this tutorial we will talk about sandbox and how deployments are handled in Salesforce. Let’s start with Sandbox.

What is Sandbox?
Sandbox is a copy of a production environment.The main purpose of Sandbox is testing and development of new changes.

How Sandbox works?

Whenever you create or refresh a sandbox, copy of the production environment at that point in time is made. Most of the configuration remain same as production org. Few changes are done to the sandbox during the copy process like sandbox name is appended to the username of all the users of the sandbox. Some of the sandbox will also allow you to copy data from production into the sandbox as well. If no data is copied (like in developer edition sandbox) then the metadata will be migrated but no records will be copied to sandbox.

What’s the purpose of a Sandbox?
If you are working on a new Force.com application then I will recommend you to test and build the application in a sandbox. Once you are satisfied with the application, then you can migrate the metadata as well as data (if possible) to the production environment. By testing the application in a sandbox, you will be able to experiment without the risk of creating unused configuration or fields, interfering with existing application and other concerns.

Most companies use a multi-staged deployment method- the most common example is development and unit testing in one sandbox and then testing in a QA box ( full sandbox) and once everything looks good then move it to production.

Different types of Sandbox:
You are lucky if you have access to all the sandbox types. Here is one way to use them. If you don’t have all types available, you will be required to combine some tasks.

1) Full Sandbox – Fully testing changes against real data before deploying them to production. This may include user acceptance testing. All changes must pass through this sandbox. If multiple admins/developers are working on overlying areas, this is the place where changes get merged. Force.com IDE can be used to compare changes by different developers of the same apex code.

2) Partial Data Sandbox – This is a new sandbox type and I am not quite sure what was the intentions for this sandbox. It is just a cheaper alternative to a full sandbox. If you have a full sandbox, then partial data sandbox can be a good place for user training for new features, new employees, etc. Having real data can really help with training of new employees and also testing the new features. Partial Sandbox can also be used as a place to work on integration changes since it can hold large amount of real data.

3) Developer – A place to work through solutions to new requirements. The main idea is to keep experimentation out of the full sandbox. It there are multiple admins/developers, each one should get their own Developer sandbox so that they don’t disturb each other work until they are ready to deploy the changes in Full Sandbox.

4) Developer Pro – The main difference between Developer Pro and Developer is the amount of data that can be stored. It also contains some amount of product data from production. If you are looking for these two things then you can pick Developer Pro over developer Sandbox. Otherwise, both are very similar.

How to Login to a Sandbox?
You can login to a Sandbox using Sandbox URL. Similarly, to log into production you need production URL. This is same as login via the website or API.

Production URL: https://login.salesforce.com
Sandbox URL: https://test.salesforce.com

Migrating Metadata Between Different Environments:
There are different types of tools available which can help an adminstrator or developer to migrate metadata (configuration info) from one environment to another. The most common tools are here:

1) Change Sets
2) Force.com IDE ( developer toolkit)

Below are some important points to remember regarding sandboxes:

  • Your sandbox will get out of sync with production org almost immediately. If you are making regular configuration changes to your production org this can be problematic.
  • Test your deployment: Change sets and IDE are great tool for migrating metadata. Always use Preview deployment feature available in change sets. Always test your deployment in more than one sandbox specially if you are new to migration process.
  • Promotion of profiles can be problematic, change sets are comparatively easier.
  • The amount of time to create a full sandbox( with data) depends on the amount of data present in your production org.
  • Whenever you create a full sandbox, the record IDs (contacts, accounts etc) will match the production environment (org ID will vary). The new records which you will create in either environments, new record IDs will not match.

This Post Has 50 Comments

  1. User

    is there a video on this topic ?

  2. berkey

    Your way of explaining everything in this piece of writing is genuinely fastidious, every one can without difficulty be aware of it, Thanks a lot.|

  3. Hee Mall

    Wonderful beat ! I would like to apprentice whilst you amend your web site, how can i subscribe for a blog website? The account helped me a applicable deal. I had been tiny bit acquainted of this your broadcast provided shiny transparent idea.

  4. Werner Santano

    Perfect work you have done, this website is really cool with superb info .

  5. Sammie Spiliakos

    Thanks for the great post on your blog, it really gives me an insight on this topic.*.-”*

  6. Alvera Naffziger

    If you continues to undecided: pick up your best headphones, forehead to go and each Greatest coupe and enquire that would connect these items proper Zune maybe an iPod and view what one tunes easier to you actually, additionally where vent making you happy much. You must are certain which happens to be perfect for you.

  7. Philipp

    At this time I am ready to do my breakfast, after having my breakfast coming over again to read further news.

  8. Usually I do not learn post on blogs, but I wish to say that this write-up very
    forced me to take a look at and do it! Your writing taste has been surprised me.

    Thank you, quite great article.

  9. the feed

    I every time used to study article in news papers but now as I am a user of net so from now I am using net for articles, thanks to web.|

  10. Evelyne

    What’s up to every body, it’s my first pay
    a visit of this website; this blog contains awesome
    and really fine information for readers.

  11. layarkaca21 semi

    Hello there, You’ve done an incredible job. I’ll definitely digg it and personally recommend to
    my friends. I’m confident they’ll be benefited from this website.

  12. Fannie

    It is the best time to make some plans for the future and it’s
    time to be happy. I have read this post and if I could I
    wish to suggest you some interesting things or advice.
    Perhaps you could write next articles referring to this article.
    I wish to read even more things about it!

  13. This design is wicked! You definitely know how to keep a reader entertained.

    Between your wit and your videos, I was almost moved
    to start my own blog (well, almost…HaHa!) Wonderful job.
    I really loved what you had to say, and more than that, how
    you presented it. Too cool!

  14. thefeed

    This info is invaluable. Where can I find out more?|

  15. Jill

    Hey very interesting blog!

  16. With havin so much written content do you ever run into any problems of plagorism or copyright infringement?
    My website has a lot of unique content I’ve either created
    myself or outsourced but it appears a lot of it is popping
    it up all over the internet without my agreement. Do you know any solutions to help prevent content
    from being ripped off? I’d really appreciate it.

  17. Heya i am for the first time here. I came across
    this board and I find It really useful & it helped me out
    much. I hope to give something back and aid others
    like you helped me.

  18. feed

    Good day! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains. If you know of any please share. Cheers!|

  19. layarkaca21

    I know this site offers quality dependent posts and extra stuff, is there any other web
    page which offers these data in quality?

  20. Excellent article. Keep writing such kind of info
    on your blog. Im really impressed by your blog.
    Hello there, You have done a fantastic job. I’ll definitely digg it and individually suggest to my
    friends. I am confident they will be benefited from this website.

  21. Elizabet

    Unfortunately, miHoYo has not been in a position to make
    1 plus 1 equal three, and there are twoo major reasons why.

  22. the feed

    Hello there! This article couldn’t be written much better! Reading through this post reminds me of my previous roommate! He constantly kept preaching about this. I am going to forward this post to him. Pretty sure he will have a good read. I appreciate you for sharing!|

  23. Hi there, I found your website by the use of Google while looking
    for a comparable subject, your website got here up, it appears to be like great.
    I’ve bookmarked it in my google bookmarks.
    Hi there, simply become alert to your blog via Google, and
    found that it is truly informative. I’m gonna be careful for brussels.
    I will appreciate should you continue this in future.

    Numerous folks might be benefited from your writing.

    Cheers!

  24. layarkaca21 xxi

    No matter if some one searches for his necessary thing,
    therefore he/she wishes to be available that in detail, thus that
    thing is maintained over here.

  25. thefeed

    Hello There. I found your blog using msn. This is a really well written article. I’ll be sure to bookmark it and come back to read more of your useful information. Thanks for the post. I’ll certainly comeback.|

  26. Julienne

    Somebody necessarily help to make significantly articles
    I might state. This is the very first time I frequented your web page and up to now?
    I amazed with the research you made to make this actual submit extraordinary.
    Magnificent task!

  27. Abel

    Incredible points. Sound arguments. Keep up the great effort.

  28. Delores

    hi!,I love your writing very so much! percentage we
    keep up a correspondence more approximately your article
    on AOL? I need a specialist on this space to unravel my problem.
    May be that’s you! Looking forward to peer you.

  29. Christian

    I have read so many posts concerning the blogger lovers but this
    piece of writing is actually a pleasant piece of writing,
    keep it up.

  30. Roxana

    If some one wishes to be updated with hottest technologies
    after that he must be pay a quick visit this web page and be
    up to date every day.

  31. Frieda

    Now I am going to do my breakfast, after having my
    breakfast coming over again to read more news.

  32. Clarice

    Hello my friend! I wish to say that this article is amazing, great
    written and come with almost all significant infos. I would like to look extra posts like this .

  33. Ermelinda

    Attractive component of content. I simply stumbled upon your site and in accession capital to claim
    that I acquire in fact enjoyed account your blog posts. Any way I’ll be subscribing for your
    augment or even I achievement you get entry to constantly quickly.

  34. Doyle

    Why users still use to read news papers when in this technological world everything is existing on web?

  35. Gregorio

    You need to be a part of a contest for one of the greatest websites on the internet.
    I most certainly will recommend this website!

  36. Brianna

    Appreciate the recommendation. Will try it out.

  37. Bertie

    I seriously love your website.. Excellent colors & theme.
    Did you create this web site yourself? Please reply back as I’m wanting to create my own site and want to know where you got
    this from or exactly what the theme is named. Cheers!

  38. I do not even know how I ended up right here, but I believed this submit was once great. I do not realize who you are but definitely you are going to a famous blogger in the event you are not already. Cheers!|

  39. Sadye

    Thank you for the auspicious writeup. It actually used to be
    a leisure account it. Look complicated to more added agreeable from you!
    By the way, how could we communicate?

  40. Nate

    Excellent weblog here! Additionally your web site lots up fast!

    What host are you the usage of? Can I get your associate link on your host?
    I want my web site loaded up as fast as yours lol

  41. Karla

    You can certainly see your enthusiasm in the
    article you write. The sector hopes for more passionate writers like you who are not afraid to mention how they believe.
    Always go after your heart.

  42. Leta

    What’s up, just wanted to say, I liked this post.
    It was funny. Keep on posting!

  43. Jacqueline

    Hello! This is my 1st comment here so I just wanted to give a quick
    shout out and say I genuinely enjoy reading through your blog posts.
    Can you suggest any other blogs/websites/forums that
    go over the same subjects? Thanks a lot!

Leave a Reply