Tuesday 31 March 2015

Salesforce 2 Salesforce Data Migration

Salesforce to Salesforce Data Migration

There are several Data Migration tools in Salesforce which helps to migrate data swiftly from one salesforce org to another.
There is another mode of data transfer between two organisations is by S2S. This is a feature which is present within salesforce.com. In this tip we will discuss about S2S data migration.
It has some advantages as well as some disdvantages.

Advantages:
a) It helps to transfer data very quickly around 1000 data/3-4 secs.
b) The data which is shared between two organisations are automatically updated in the target organisation if there is some modification in the source organisation.

Disdavantages:
a) We know that we can set the value of audit fields of most of the standard objects and all custom objects only during first insert by enabling the feature from Salesforce.com support. But S2S feature doesn't expose the audit fields even after enabling it. This is a big fault in S2S.
b) We cannot migrate data of all standard objects through S2S connection. There are some specific standard objects whose data we can transfer.
c) S2S connection cannot be created between Production and Sandbox organisation or between Developer and Sandbox organisation.

Things to Set up for S2S migration:

a) First of all we need to enable Salesforce to Salesforce connection in both the source and target organisations.
b) Then we need to enable the Connection tab.
c) In the connections tab we need to create a new connection by selecting an account and contact from the lookup in the source organisation.
d) After that a link will be sent to the contact's email by clicking which, we open the target organisation and create the connection between the source and target.
e) Now that all the connections are ready we can start sharing the objects and fields the datas of which we need to transfer.
f) First we need to Publish the objects in the source organisation by checking them in the list.
g) In the target organisation we need to go the Subscribe/Unsubscribe section and need to accept the objects which are shared by the source organisation and we can check the auto-accept checkbox which implies that data will be auto-accepted after those will be shared by the source organisation.
h) Then in the source organisation we need to check the fields of the objects which we want to share so that those can be visible in the target.
i) Then we can map the fields shared by source organisation with those in the target organisation.

Data Transfer with Lookups:

We can transfer data between two organisations in two modes:

a) Manually - We can see a button in the list view of all objects "Forward to Connections". We can click this button by checking the datas we need to transfer from the list and then select the connection name to which the data needs to be transferred. We can observe that there are checkboxes present below regarding transfer of the related datas. If we select those the related lookup object datas will be transferred as well. In this way we can transfer related datas as well.
For e.g When transferring accounts, there will be a checkbox below mentioning "Send Related Contacts". By checking that the related contacts will also be transferred along with the accounts.

#Note: Manual S2S data transfer is best when the data amount is not huge.

b) Apex Script - When there is large amount of data, then data transfer through script will be the best option. What we can do is to create a batch Apex and transfer the data mentioning the batch size and by selecting the connection name through query. We can set the lookups through script as well.
For e.g When transferring accounts we can mention in script to transfer the related datas as well i.e contact, case etc by
acc.relatedList(Contact,Case);
We can also make lookp up through script.
Suppose account is already transferred to target organisation. Now while transferring contacts we can make lookup with parent account by
String accountId = con.AccountId;
con.parentRecordId(accountId);
But remember this parent record lookup assignment are helpful when there is only one lookup present. But when an object has many lookups then we have to send the oldprimarykey and oldparentid through formula field to the target organisation and then in target organisation we have to write script to assign them.

5 comments:

  1. By taking help from your data migration service provider team, I had successfully stored the migrated data into the Cloud. The solutions offered by your company have guaranteed to help me in the future data migrations as well.

    ReplyDelete
  2. Simply wish to say your article is as astonishing. The clarity in your post is simply great, and I could assume you are an expert on this subject. Same as your blog i found another one Data Migration Software .Actually I was looking for the same information on internet for Data Migration Assistant and came across your blog. I am impressed by the information that you have on this blog. Thanks a million and please keep up the gratifying work.

    ReplyDelete
  3. Most organizations have a difficult time with their data; there are multiple copies of various applications and data scattered around the enterprise. The lack of a good strategy for data management has created a need for aData Migration ServiceData Migration Company provides efficient solutions for your data management problems.

    ReplyDelete
  4. Salesforce data migration is defined as the process of moving Salesforce data to other platforms where required. Many elements can impact the trouble of playing out this errand. More extensive data arrangements will take additional time and make it more challenging to guarantee the legitimacy of the transferred data.

    ReplyDelete