Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //UPDATE RECORD
- $fieldsToUpdate = array (
- 'FirstName' => 'test.com 1',
- 'City' => 'test',
- 'Country' => 'test'
- );
- $sObject1 = new SObject();
- $sObject1->fields = $fieldsToUpdate;
- $sObject1->type = 'Contact';
- $sObject1->Id = $UPDATEID1;
- $response = $loginResult->update(array ($sObject1));
- print_r($response);
- } catch (Exception $e) {
- print_r($loginResult->getLastRequest());
- echo $e->faultstring;
- }
- ?>
- <?php
- //UPSERT RECORD!
- $sObject->fields['FirstName'] = 'Barrie';
- $sObject->fields['LastName'] = 'Reader';
- $upsertResponse = $loginResult->upsert("Email", array ($sObject));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement