I have changed the structure of my salesforce database and now I need to migrate the data. I was just wondering which tool is the best one to use or which technique also, because I need to migrate data from 2 related object.
I have:
Opportunity: Detail Number
Contract: Contract Number
So, an opportunity can have many contracts, and I need to extract the relationship between the Contract Number and the Detail Number on Opportunity.
I have a query for that:
'SELECT Detail_Number__c (SELECT Contract_Number__c FROM Contract__r) FROM Opportunity'
This should give me all the Contracts that are related to the opportunity, right?
My new structure is as follows. I have removed the Detail Number from Opportunity, and we hold it on Contract instead now.
Contract --> ContractDetailNumbers
<-- DetailNumber
I have created an object to hold the detail numbers and a junction object, because a contract can have more than one detail numbers.
So, I assume I will just insert all the detail numbers into DetailNumber and then create the junction objects from the file that I extracted earlier.
Would that be the best way of doing this? Which tool would you use?
Tia.