| @@ 54-65 (lines=12) @@ | ||
| 51 | * @param array $sObjects Array of one or more sObjects (up to 200) to create. |
|
| 52 | * @return SaveResult |
|
| 53 | */ |
|
| 54 | public function create($sObjects) |
|
| 55 | { |
|
| 56 | $arg = new stdClass; |
|
| 57 | foreach ($sObjects as $sObject) { |
|
| 58 | if (isset ($sObject->fields)) { |
|
| 59 | $sObject->any = $this->_convertToAny($sObject->fields); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | $arg->sObjects = $sObjects; |
|
| 63 | ||
| 64 | return parent::_create($arg); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Merge records |
|
| @@ 137-148 (lines=12) @@ | ||
| 134 | * @param array sObjects Array of sObjects |
|
| 135 | * @return UpdateResult |
|
| 136 | */ |
|
| 137 | public function update($sObjects) |
|
| 138 | { |
|
| 139 | $arg = new stdClass; |
|
| 140 | foreach ($sObjects as $sObject) { |
|
| 141 | if (isset($sObject->fields)) { |
|
| 142 | $sObject->any = $this->_convertToAny($sObject->fields); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | $arg->sObjects = $sObjects; |
|
| 146 | ||
| 147 | return parent::_update($arg); |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * Creates new objects and updates existing objects; uses a custom field to |
|