I am new to the PHP Toolkit and I am trying to understand where I can find standard objects/records that I have created using the following code in a php file downloaded from the PHP Toolkit sample code:

$sObject = new stdclass();
$sObject->FirstName = 'Smith';
$sObject->LastName = 'John';
$sObject->Phone = '510-555-5555';
$sObject->BirthDate = '1927-01-25';

$sObject2 = new stdclass();
$sObject2->FirstName = 'Mary';
$sObject2->LastName = 'Smith';
$sObject2->Phone = '510-486-9969';
$sObject2->BirthDate = '1957-01-25';

echo "**** Creating the following:\r\n";
$createResponse = $mySforceConnection->create(array($sObject, $sObject2), 'Contact');

$ids = array();
foreach ($createResponse as $createResult) {
  array_push($ids, $createResult->id);

I want to log onto Salesforce.com and see these records that I've created here. Is that even possible? I have also tried using the defineGlobal() method but I don't understand what I'm printing to the console when I do that.

Any help is greatly appreciated!

edit: here is what the console prints when I run the above code:

**** Creating the following:
stdClass Object
    [id] => 00337000003X5ISAA0
    [success] => 1
stdClass Object
    [id] => 00337000003X5ITAA0
    [success] => 1
  • You would post the print_r result also. Assuming that it won't show like [Object object] – Ashwani Aug 17 '15 at 15:21
  • I just added to my post what the console prints - is that what you meant? – Mimi Sakarett Aug 17 '15 at 15:24
  • In console you are clearly getting new created record ID. Aren't you able to get it in code? – Ashwani Aug 17 '15 at 15:25
  • I hoped that I would be able to view these records on my instance of Salesforce.com. I don't understand where these records are being held. Another way to ask my question is: What are all of the ways that I can view these records? Am I only able to view them in the console? – Mimi Sakarett Aug 17 '15 at 15:29

You can see them in Salesforce by creating a list view on contact object and set following filter:

Created by = [User on behalf of this PHP toolkit is creating record]
Created Date = TODAY()

By the ID prefix, they are record of standard Contact object. The best way is to see list of these records is use CreatedDate field and CreatedByID field to get these records in salesforce.

| improve this answer | |
  • 1
    Thank you! I didn't know that I needed to leave the Setup area. – Mimi Sakarett Aug 17 '15 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.