Problem/Motivation
I have a pull mapping that maps LastModifiedDate to a node's last updated property. This results in the following error:
duplicate field selected: LastModifiedDate in Salesforce->apiCall() (line 104 of .../salesforce/includes/salesforce.inc).
Tracing this issue back, it appears that while Id is prevented from being duplicated in the SalesforceSelectQuery fields of salesforce_pull_get_updated_records(), LastModifiedDate is not. Futhermore, it's not necessary to use a foreach on $mapped_fields. A simple array_merge() will suffice.
Proposed resolution
Replace the mapping field's foreach in salesforce_pull_get_updated_records() with a simple array_merge(). This ensures Id and LastModifiedDate are part of the query, but doesn't double up any query selections.
Remaining tasks
Review the attached patch.
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2553413-3.patch | 906 bytes | pianomansam |
Comments
Comment #2
pianomansam commentedComment #3
pianomansam commentedForgot a drupal_map_assoc(). Patched updated.
Comment #5
aaronbaumancommitted