@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | $createResponse = $this->_mySforceConnection->create(array($sObject), 'Contact'); |
17 | 17 | |
18 | - $retrieveResult= $this->_mySforceConnection->retrieve("FirstName, LastName, Phone", "Contact", $createResponse->id); |
|
18 | + $retrieveResult = $this->_mySforceConnection->retrieve("FirstName, LastName, Phone", "Contact", $createResponse->id); |
|
19 | 19 | echo "***** Before fieldsToNull\r\n"; |
20 | 20 | print_r($retrieveResult); |
21 | 21 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | protected function _run() |
10 | 10 | { |
11 | - $fields = array ( |
|
11 | + $fields = array( |
|
12 | 12 | 'Type' => 'Electrical' |
13 | 13 | ); |
14 | 14 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $sObject->fields = $fields; |
17 | 17 | $sObject->type = 'Case'; |
18 | 18 | |
19 | - $response = $this->_mySforceConnection->create(array ($sObject)); |
|
19 | + $response = $this->_mySforceConnection->create(array($sObject)); |
|
20 | 20 | |
21 | 21 | echo "Creating Case:\n"; |
22 | 22 | print_r($response); |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | $obj1->type = 'Lead'; |
12 | 12 | |
13 | - $fields = array ( |
|
13 | + $fields = array( |
|
14 | 14 | 'Company' => 'XYZ Company', |
15 | 15 | 'FirstName' => 'John', |
16 | 16 | 'LastName' => 'Smith', |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | 'Status' => 'Open' |
20 | 20 | ); |
21 | 21 | $obj1->fields = $fields; |
22 | - $createResponse = $this->_mySforceConnection->create(array ($obj1)); |
|
22 | + $createResponse = $this->_mySforceConnection->create(array($obj1)); |
|
23 | 23 | |
24 | 24 | echo "***** Creating Lead *****\n"; |
25 | 25 | print_r($createResponse); |
26 | 26 | |
27 | 27 | $id = $createResponse->id; |
28 | - $deleteResponse = $this->_mySforceConnection->delete(array ($id)); |
|
28 | + $deleteResponse = $this->_mySforceConnection->delete(array($id)); |
|
29 | 29 | echo "***** Deleting Lead *****\n"; |
30 | 30 | print_r($deleteResponse); |
31 | 31 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $currentTime = mktime(); |
36 | 36 | // assume that delete occured within the last 5 mins. |
37 | - $startTime = $currentTime - (60*10); |
|
37 | + $startTime = $currentTime - (60 * 10); |
|
38 | 38 | $endTime = $currentTime; |
39 | 39 | |
40 | 40 | echo "***** Get Deleted Leads *****\n"; |
@@ -12,7 +12,7 @@ |
||
12 | 12 | protected function _run() |
13 | 13 | { |
14 | 14 | // Create Contact |
15 | - $fields = array ( |
|
15 | + $fields = array( |
|
16 | 16 | 'FirstName' => 'John', |
17 | 17 | 'LastName' => 'Smith', |
18 | 18 | 'Phone' => '510-555-5555', |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $header = new EmailHeader(true, false, false); |
15 | 15 | $this->_mySforceConnection->setEmailHeader($header); |
16 | 16 | |
17 | - $createFields = array ( |
|
17 | + $createFields = array( |
|
18 | 18 | 'FirstName' => 'Nick', |
19 | 19 | 'LastName' => 'Tran', |
20 | 20 | 'Email' => $EMAILIDFORHEADER, |
@@ -19,14 +19,14 @@ |
||
19 | 19 | |
20 | 20 | // print_r($queryResult); |
21 | 21 | |
22 | - !$done = false; |
|
22 | + ! $done = false; |
|
23 | 23 | |
24 | - echo "Size of records: ".$queryResult->size; |
|
24 | + echo "Size of records: " . $queryResult->size; |
|
25 | 25 | |
26 | 26 | if ($queryResult->size > 0) { |
27 | - while (!$done) { |
|
27 | + while ( ! $done) { |
|
28 | 28 | foreach ($queryResult->records as $record) { |
29 | - echo 'NumberOfEmployees=' .$record->fields->NumberOfEmployees."\r\n"; |
|
29 | + echo 'NumberOfEmployees=' . $record->fields->NumberOfEmployees . "\r\n"; |
|
30 | 30 | } |
31 | 31 | if ($queryResult->done != true) { |
32 | 32 | echo "***** Get Next Chunk *****\n"; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | protected function _validate($rs) |
44 | 44 | { |
45 | - if(strpos($rs, 'Error') !== FALSE) { |
|
45 | + if (strpos($rs, 'Error') !== FALSE) { |
|
46 | 46 | throw new Lib_Exception_InvalidResponse(); |
47 | 47 | } |
48 | 48 | } |
@@ -10,17 +10,17 @@ discard block |
||
10 | 10 | |
11 | 11 | protected function _run() |
12 | 12 | { |
13 | - $pv = new stdClass(); |
|
14 | - $pv->majorNumber = 2; |
|
15 | - $pv->minorNumber = 1; |
|
16 | - $pv->namespace = SforcePartnerClient::PARTNER_NAMESPACE; |
|
17 | - $header = new PackageVersionHeader( |
|
18 | - array($pv) |
|
19 | - ); |
|
20 | - print_r($header); |
|
21 | - $this->_mySforceConnection->setPackageVersionHeader($header); |
|
13 | + $pv = new stdClass(); |
|
14 | + $pv->majorNumber = 2; |
|
15 | + $pv->minorNumber = 1; |
|
16 | + $pv->namespace = SforcePartnerClient::PARTNER_NAMESPACE; |
|
17 | + $header = new PackageVersionHeader( |
|
18 | + array($pv) |
|
19 | + ); |
|
20 | + print_r($header); |
|
21 | + $this->_mySforceConnection->setPackageVersionHeader($header); |
|
22 | 22 | |
23 | - $fields = array ( |
|
23 | + $fields = array ( |
|
24 | 24 | 'FirstName' => 'John', |
25 | 25 | 'LastName' => 'Smith', |
26 | 26 | 'Phone' => '510-555-5555', |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | $sObject->type = 'Contact'; |
33 | 33 | |
34 | 34 | $createResponse = $this->_mySforceConnection->create(array($sObject)); |
35 | - echo "**** Creating the following:\r\n"; |
|
35 | + echo "**** Creating the following:\r\n"; |
|
36 | 36 | print_r($createResponse); |
37 | 37 | |
38 | 38 | print "**** LastRequestHeaders:\r\n"; |
39 | - print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
40 | - print "**** LastRequest:\r\n"; |
|
41 | - print_r($this->_mySforceConnection->getLastRequest()); |
|
39 | + print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
40 | + print "**** LastRequest:\r\n"; |
|
41 | + print_r($this->_mySforceConnection->getLastRequest()); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -20,7 +20,7 @@ |
||
20 | 20 | print_r($header); |
21 | 21 | $this->_mySforceConnection->setPackageVersionHeader($header); |
22 | 22 | |
23 | - $fields = array ( |
|
23 | + $fields = array( |
|
24 | 24 | 'FirstName' => 'John', |
25 | 25 | 'LastName' => 'Smith', |
26 | 26 | 'Phone' => '510-555-5555', |
@@ -29,12 +29,12 @@ |
||
29 | 29 | print_r($createResponse); |
30 | 30 | |
31 | 31 | $leadConvert = new stdClass; |
32 | - $leadConvert->convertedStatus='Closed - Converted'; |
|
33 | - $leadConvert->doNotCreateOpportunity='false'; |
|
32 | + $leadConvert->convertedStatus = 'Closed - Converted'; |
|
33 | + $leadConvert->doNotCreateOpportunity = 'false'; |
|
34 | 34 | // $leadConvert->leadId=$convertLEADID; |
35 | - $leadConvert->leadId=$createResponse->id; |
|
36 | - $leadConvert->overwriteLeadSource='true'; |
|
37 | - $leadConvert->sendNotificationEmail='true'; |
|
35 | + $leadConvert->leadId = $createResponse->id; |
|
36 | + $leadConvert->overwriteLeadSource = 'true'; |
|
37 | + $leadConvert->sendNotificationEmail = 'true'; |
|
38 | 38 | |
39 | 39 | $leadConvertArray = array($leadConvert); |
40 | 40 | $leadConvertResponse = $this->_mySforceConnection->convertLead($leadConvertArray); |