Skip to content
Snippets Groups Projects
Commit 14bb22a4 authored by Tauno Hogue's avatar Tauno Hogue
Browse files

Limit fields included on pull to mapped fields

parent 175f2e3f
No related branches found
No related tags found
No related merge requests found
......@@ -579,8 +579,7 @@ class SalesforceMapping extends ConfigEntityBase implements SalesforceMappingInt
// Convert field mappings to SOQL.
if (empty($mapped_fields)) {
$describe = $this->client()->objectDescribe($object_type);
$mapped_fields = array_keys($describe->getFields());
$mapped_fields = $this->getPullFieldsArray();
}
$soql->fields = $mapped_fields;
$soql->fields[] = 'Id';
......
......@@ -171,7 +171,7 @@ interface SalesforceMappingInterface extends ConfigEntityInterface {
* Generate a select query to pull records from Salesforce for this mapping.
*
* @param array $mapped_fields
* Fetch only these fields, if given, otherwise fetch all fields.
* Fetch only these fields, if given, otherwise fetch all mapped fields.
*
* @return \Drupal\salesforce\SelectQuery
*/
......
......@@ -119,7 +119,7 @@ class QueueHandler {
}
/**
* Perform the SFO Query on each SF Object type with concolidated array of fields.
* Perform the SFO Query for a mapping and its mapped fields.
*
* @param SalesforceMappingInterface
* Mapping for which to execute pull
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment