Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2.     //UPDATE RECORD
  3.     $fieldsToUpdate = array (
  4.         'FirstName' => 'test.com 1',
  5.         'City' => 'test',
  6.         'Country' => 'test'
  7.     );
  8.     $sObject1 = new SObject();
  9.     $sObject1->fields = $fieldsToUpdate;
  10.     $sObject1->type = 'Contact';
  11.     $sObject1->Id = $UPDATEID1;
  12.      
  13.     $response = $loginResult->update(array ($sObject1));
  14.     print_r($response);
  15.      
  16.     } catch (Exception $e) {
  17.         print_r($loginResult->getLastRequest());
  18.         echo $e->faultstring;
  19.     }
  20. ?>
  21. <?php
  22.     //UPSERT RECORD!
  23.     $sObject->fields['FirstName'] = 'Barrie';
  24.     $sObject->fields['LastName'] = 'Reader';
  25.     $upsertResponse = $loginResult->upsert("Email", array ($sObject));
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement