@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | |
11 | 11 | protected function _run() |
12 | 12 | { |
13 | - $header = new AllowFieldTruncationHeader(true); |
|
14 | - print_r($header); |
|
15 | - $this->_mySforceConnection->setAllowFieldTruncationHeader($header); |
|
13 | + $header = new AllowFieldTruncationHeader(true); |
|
14 | + print_r($header); |
|
15 | + $this->_mySforceConnection->setAllowFieldTruncationHeader($header); |
|
16 | 16 | |
17 | - $fields = array ( |
|
17 | + $fields = array ( |
|
18 | 18 | 'FirstName' => 'John', |
19 | 19 | 'LastName' => 'Smith', |
20 | 20 | 'Phone' => '511111111111111111111111110-555-5555111111111111111111111111111111111111111111111111', |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | $sObject->type = 'Contact'; |
27 | 27 | |
28 | 28 | $createResponse = $this->_mySforceConnection->create(array($sObject)); |
29 | - echo "**** Creating the following:\r\n"; |
|
29 | + echo "**** Creating the following:\r\n"; |
|
30 | 30 | print_r($createResponse); |
31 | 31 | |
32 | 32 | print "**** LastRequestHeaders:\r\n"; |
33 | - print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
34 | - print "**** LastRequest:\r\n"; |
|
35 | - print_r($this->_mySforceConnection->getLastRequest()); |
|
33 | + print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
34 | + print "**** LastRequest:\r\n"; |
|
35 | + print_r($this->_mySforceConnection->getLastRequest()); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | \ No newline at end of file |
@@ -14,7 +14,7 @@ |
||
14 | 14 | print_r($header); |
15 | 15 | $this->_mySforceConnection->setAllowFieldTruncationHeader($header); |
16 | 16 | |
17 | - $fields = array ( |
|
17 | + $fields = array( |
|
18 | 18 | 'FirstName' => 'John', |
19 | 19 | 'LastName' => 'Smith', |
20 | 20 | 'Phone' => '511111111111111111111111110-555-5555111111111111111111111111111111111111111111111111', |
@@ -37,7 +37,7 @@ |
||
37 | 37 | print_r($createResponse); |
38 | 38 | */ |
39 | 39 | |
40 | - $new_password=$this->_mySforceConnection->resetPassword('005t0000000uonmAAA'); |
|
40 | + $new_password = $this->_mySforceConnection->resetPassword('005t0000000uonmAAA'); |
|
41 | 41 | print_r($new_password); |
42 | 42 | } |
43 | 43 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $singleEmail2->emailPriority = EMAIL_PRIORITY_LOW; |
26 | 26 | |
27 | 27 | echo "***** Send Emails *****\n"; |
28 | - $emailResponse = $this->_mySforceConnection->sendSingleEmail(array ($singleEmail1, $singleEmail2)); |
|
28 | + $emailResponse = $this->_mySforceConnection->sendSingleEmail(array($singleEmail1, $singleEmail2)); |
|
29 | 29 | |
30 | 30 | print_r($emailResponse); |
31 | 31 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $obj1 = new SObject(); |
12 | 12 | $obj1->type = 'Lead'; |
13 | 13 | |
14 | - $fields = array ( |
|
14 | + $fields = array( |
|
15 | 15 | 'Company' => 'XYZ Company', |
16 | 16 | 'FirstName' => 'John', |
17 | 17 | 'LastName' => 'Smith', |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $currentTime = mktime(); |
38 | 38 | // assume that update occured within the last 5 mins. |
39 | - $startTime = $currentTime-(60*10); |
|
39 | + $startTime = $currentTime - (60 * 10); |
|
40 | 40 | $endTime = $currentTime; |
41 | 41 | |
42 | 42 | echo "***** Get Updated Leads from the last 5 minutes *****\n"; |
@@ -13,14 +13,14 @@ |
||
13 | 13 | $this->_mySforceConnection->setQueryOptions($options); |
14 | 14 | $response = $this->_mySforceConnection->query($query); |
15 | 15 | $queryResult = new QueryResult($response); |
16 | - !$done = false; |
|
16 | + ! $done = false; |
|
17 | 17 | |
18 | - echo "Size of records: ".$queryResult->size; |
|
18 | + echo "Size of records: " . $queryResult->size; |
|
19 | 19 | |
20 | 20 | if ($queryResult->size > 0) { |
21 | - while (!$done) { |
|
21 | + while ( ! $done) { |
|
22 | 22 | foreach ($queryResult->records as $record) { |
23 | - echo $record->fields->NumberOfEmployees."\r\n"; |
|
23 | + echo $record->fields->NumberOfEmployees . "\r\n"; |
|
24 | 24 | } |
25 | 25 | if ($queryResult->done != true) { |
26 | 26 | echo "***** Get Next Chunk *****\n"; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $UPDATEOBJECTID1 = '00QA0000001QSQo'; |
15 | 15 | $UPDATEOBJECTID2 = '00QA0000001QSQn'; |
16 | 16 | |
17 | - $fieldsToUpdate = array ( |
|
17 | + $fieldsToUpdate = array( |
|
18 | 18 | 'FirstName' => 'testupdate', |
19 | 19 | 'City' => 'testupdateCity', |
20 | 20 | 'Country' => 'US' |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $sObject1->type = 'Lead'; |
25 | 25 | $sObject1->Id = $UPDATEOBJECTID1; |
26 | 26 | |
27 | - $fieldsToUpdate = array ( |
|
27 | + $fieldsToUpdate = array( |
|
28 | 28 | 'FirstName' => 'testupdate', |
29 | 29 | 'City' => 'testupdate', |
30 | 30 | 'State' => 'testupdate', |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | $createResponse = $this->_mySforceConnection->create(array($sObject)); |
50 | 50 | |
51 | - $retrieveResult= $this->_mySforceConnection->retrieve("FirstName, LastName, Phone", "Contact", $createResponse->id); |
|
51 | + $retrieveResult = $this->_mySforceConnection->retrieve("FirstName, LastName, Phone", "Contact", $createResponse->id); |
|
52 | 52 | echo "***** Before fieldsToNull\r\n"; |
53 | 53 | print_r($retrieveResult); |
54 | 54 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | $sObject = new SObject(); |
12 | 12 | $sObject->type = 'Contact'; |
13 | 13 | $fields = array ( |
14 | - 'LastName'=>'Tran', |
|
15 | - 'BirthDate'=> '1927-01-25', |
|
16 | - 'Phone' => '510-555-5555', |
|
14 | + 'LastName'=>'Tran', |
|
15 | + 'BirthDate'=> '1927-01-25', |
|
16 | + 'Phone' => '510-555-5555', |
|
17 | 17 | ); |
18 | 18 | $sObject->fields = $fields; |
19 | 19 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | $sObject = new SObject(); |
12 | 12 | $sObject->type = 'Contact'; |
13 | - $fields = array ( |
|
13 | + $fields = array( |
|
14 | 14 | 'LastName'=>'Tran', |
15 | 15 | 'BirthDate'=> '1927-01-25', |
16 | 16 | 'Phone' => '510-555-5555', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $sObject3->fields = $fields; |
30 | 30 | |
31 | 31 | echo "Create 3 contacts.\n"; |
32 | - $createResponse = $this->_mySforceConnection->create(array($sObject, $sObject2, $sObject3),'Lead'); |
|
32 | + $createResponse = $this->_mySforceConnection->create(array($sObject, $sObject2, $sObject3), 'Lead'); |
|
33 | 33 | |
34 | 34 | print_r($createResponse); |
35 | 35 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | protected function _run() |
14 | 14 | { |
15 | - $fields = array ( |
|
15 | + $fields = array( |
|
16 | 16 | 'FirstName' => 'John', |
17 | 17 | 'LastName' => 'Smith', |
18 | 18 | 'Phone' => '510-555-5555', |