function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IT Systems2IT Systems2 

Initial Sync to Epicor ERP from SFDC

We are setting up an Integration between our Epicor ERP and Salesforce. We are only using this integration for Accounts/Contacts and are able to get the sync to work properly. The only part that is missing is for the initial sync, it is not pulling all existing Accounts from Salesforce into Epicor. It will pull them ones that we update or create after the initial sync. 
How have people gone about triggering all Accounts/Contacts to sync? We have 270,000 Accounts to sync, using Epicor 10.2.400. 
SwethaSwetha (Salesforce Developers) 
There might be optimized alternative approaches for this issue but the below approach will give an idea of where to start.

It looks like the Epicor system pulls data only when the Accounts/Contacts records are modified. So the idea is to trigger the existing records by making a small change. You can create a custom checkbox field say "Synced__c" on the objects and set visible as checked only for system admin profile and remove it from all pagelayouts so that no one in the Org will be able to see it.

Then run the below in execute an anonymous block of the developer console as it is just a one time update
  List<account> a = [select id,synced__c from account];
      for(account ac : a){
               ac.synced__c = true;

You will see that the lastmodifieddate for all the records will be changed and will help kickstart the sync process