forcedotcom / SFDX-Data-Move-Utility

SFDMU is a cutting-edge Salesforce data migration tool for seamless org population from other orgs or CSV files. It handles all CRUD operations on multiple related objects in one go.
BSD 3-Clause "New" or "Revised" License
451 stars 76 forks source link

[QUESTION] - Incase of ORG to ORG migration with Upsert operation, Columns are different in both insert and update csv files. #701

Closed kvenkatasivareddy closed 7 months ago

kvenkatasivareddy commented 7 months ago

Hi Team,

Firstly i want to thank you guys for your constant improvement and support for the plugin.

Question: Incase of ORG to ORG migration with Upsert operation for an object, we know that 2 csv files will be generated. Even the all the fields were defined as part of SOQL query, why the few columns are not there as part of both insert and update csv files?

Example: I'm trying to migrate Account object along with 2 other objects. I have attached the export.json and the csv files

Export.json: export.txt

CSV Files: Account_insert_target.csv Account_update_target.csv

Account_insert_target.csv has the below columns: a_User_Roles__c, Account_Info__c, Account_Journey__c, Account_NRR__c, Account_Region__c, AccountNumber, AccountSource, AnnualRevenue, BillingCity, BillingCountry, BillingGeocodeAccuracy, BillingLatitude, BillingLongitude, BillingPostalCode, BillingState, BillingStreet, Contract_Start_Date__c, Converted_from_Lead__c, Customer_Journey__c, Date_Field_test__c, Demo_Field__c, dupcheck__dc3DisableDuplicateCheck__c, Fax, Id, Industry, Is_Customer__c, Jigsaw, MNDA_Fully_Executed_Date__c MNDA_Signed__c , MSA_Date__c, MSA_Signed__c, Name, Number_of_Contacts__c, Number_of_Pipelines__c, Number_of_Tools__c, Number_of_Users__c, NumberOfEmployees, Phone, Point_of_Contact_Email__c, RecordTypeId, Referral__c, Referrer__c, ShippingCity, ShippingCountry, ShippingGeocodeAccuracy, ShippingLatitude, ShippingLongitude, ShippingPostalCode, ShippingState, ShippingStreet, SicDesc Sub_Region__c, Territories__c, Text_Field__c, Type, User_Roles__c, Website.

Account_update_target.csv has the below columns: Common_VC__c, Id, ParentId, RecordTypeId , Referrer__c, RelatedAccounts__c

Why the Common_VCc, ParentId and RelatedAccountsc columns from update csv file are not as part of insert csv file?

Thanks Sivareddy

hknokh2 commented 7 months ago

Hello, Thank you for reaching out to me. I will take a look at your case and let you know if there are any updates. Cheers.

github-actions[bot] commented 7 months ago

This case has been marked as 'to-be-closed', since it has no activity for the 3 days.
It will be automatically closed in another 3 days of inactivity.

hknokh commented 7 months ago

I put this back to "in progress".

hknokh commented 7 months ago

Hello,

The file _insert.csv includes fields that are updated or inserted in the target.

Concerning the Id field during insertion: Record Ids are not transferred to the target for insertion. Instead, they are generated once the records have been inserted and are then utilized to populate child lookup fields.

As for the other missing fields, these are lookup fields. Since the target parent record Ids are unknown during the insertion phase, it's not possible to populate the child lookups immediately. Therefore, SFDMU performs an update on child lookup fields after inserting the parent records.

Best regards

hknokh commented 7 months ago

Hello.

This case is now considered resolved, and I am closing it for now. If you have any additional questions or concerns, please don't hesitate to reach out.

Regards.

kvenkatasivareddy commented 7 months ago

thank you @hknokh :)