@@ 91-100 (lines=10) @@ | ||
88 | * @param array $sObjects Array of one or more sObjects (up to 200) to create. |
|
89 | * @return SaveResult |
|
90 | */ |
|
91 | public function create($sObjects) { |
|
92 | $arg = new stdClass; |
|
93 | foreach ($sObjects as $sObject) { |
|
94 | if (isset ($sObject->fields)) { |
|
95 | $sObject->any = $this->_convertToAny($sObject->fields); |
|
96 | } |
|
97 | } |
|
98 | $arg->sObjects = $sObjects; |
|
99 | return parent::_create($arg); |
|
100 | } |
|
101 | ||
102 | /** |
|
103 | * Merge records |
|
@@ 163-172 (lines=10) @@ | ||
160 | * @param array sObjects Array of sObjects |
|
161 | * @return UpdateResult |
|
162 | */ |
|
163 | public function update($sObjects) { |
|
164 | $arg = new stdClass; |
|
165 | foreach ($sObjects as $sObject) { |
|
166 | if (isset($sObject->fields)) { |
|
167 | $sObject->any = $this->_convertToAny($sObject->fields); |
|
168 | } |
|
169 | } |
|
170 | $arg->sObjects = $sObjects; |
|
171 | return parent::_update($arg); |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * Creates new objects and updates existing objects; uses a custom field to |