Created
November 22, 2019 23:20
-
-
Save pattyok/02c499bfb54fc464e38fcb4e879b2711 to your computer and use it in GitHub Desktop.
WordPress: When you want to pull in existing records from SalesForce via object-sync-to-salesforce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Add this to your functions file TEMPORARILY (just long enough to do the first sync), then remove | |
add_filter( 'object_sync_for_salesforce_pull_query_modify', __NAMESPACE__ . '\\change_pull_query', 10, 4 ); | |
// can always reduce this number if all the arguments are not necessary | |
function change_pull_query( $soql, $type, $salesforce_mapping, $mapped_fields ) { | |
$soql->conditions[0]['value'] = '2015-11-22T22:49:09Z';//change this date to early enough to capture your records | |
return $soql; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment