Closed (fixed)
Project:
Salesforce Suite
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Nov 2009 at 18:51 UTC
Updated:
5 Mar 2010 at 18:00 UTC
Jump to comment: Most recent
Attached patch replaces the if/else create/update workaround with Salesforce's idempotent upsert method.
From the documentation:
/**
* Creates new objects and updates existing objects; uses a custom field to
* determine the presence of existing objects. In most cases, we recommend
* that you use upsert instead of create because upsert is idempotent.
* Available in the API version 7.0 and later.
*
* @param string $ext_Id External Id
* @param array $sObjects Array of sObjects
* @return UpsertResult
*/
public function upsert($ext_Id, $sObjects)
| Comment | File | Size | Author |
|---|---|---|---|
| salesforce-upsert.patch | 1.98 KB | aaronbauman |
Comments
Comment #1
Anonymous (not verified) commentedPatch applied fine on latest development version. Upsert worked as expected.
Comment #2
aaronbaumanhttp://drupal.org/cvs?commit=330898