Obama '08

               
   

Go Back   Mike Simonds > Salesforce > Salesforce PHP Tutorials

This is a discussion on Salesforce Tutorials - Are they helping anyone within the Salesforce PHP Tutorials forums, part of the Salesforce category; I wanted to get some feedback from the Salesforce community to see

Reply
 
LinkBack Thread Tools Rate Thread
  #1  
Old 07-20-2007, 03:55 PM
Administrator
 
Join Date: May 2007
Posts: 246
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike
Salesforce Tutorials - Are they helping anyone

I wanted to get some feedback from the Salesforce community to see if any of these tutorials are helping in anyway. I need this feedback to see if I need to change anything with the way I am writing the scripts.

If you have any comments, questions, or concerns, please feel free to contact me or reply to this and leave your honest comments/feedback

Thanks,
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 07-27-2007, 03:20 PM
Unregistered
Guest
 
Posts: n/a
very valuable

Hello!
Just wanted to let you know that I saw your SFDC->MYSQL post--- I think that will be extremely useful!!!

Nate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 07-31-2007, 10:28 PM
Sarma
Guest
 
Posts: n/a
question

i had try tutorial #1, then i have a problem when i try you source code

require_once ('./includes/soapclient/SforcePartnerClient.php');
require_once ('./includes/soapclient/SforceHeaderOptions.php');

can you give me that 2 files ?
so i can try it again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-01-2007, 12:03 PM
Administrator
 
Join Date: May 2007
Posts: 246
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

Quote:
Originally Posted by Sarma View Post
i had try tutorial #1, then i have a problem when i try you source code

require_once ('./includes/soapclient/SforcePartnerClient.php');
require_once ('./includes/soapclient/SforceHeaderOptions.php');

can you give me that 2 files ?
so i can try it again

You get these in the Nick Tran's PHP Toolkit located here > SourceForge.net: Files
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-02-2007, 02:35 PM
Unregistered
Guest
 
Posts: n/a
Helpful tutorial.

Your code samples are quite useful. I do have a question though. . Despite the number of rows I pass in, SF seems to want to return 500, which is consistent with this description (which I actually found pretty funny)

****
By default, the number of rows returned in the query result object (batch size) returned in a query or queryMore call is set to 500. Client applications can change this setting by specifying the batch size in the call QueryOptions portion of the SOAP header before invoking the query call. The maximum batch size is 2,000 records. ___However this setting is only a suggestion. There is no guarantee that the requested batch size will be the actual batch size.___ This is done to maximize performance.
****

Is there an easy way to pull all the rows from a SF table in php?

Thanks-

jon dot bownds at praxisis dot com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 08-02-2007, 03:51 PM
Administrator
 
Join Date: May 2007
Posts: 246
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike
Talking

Quote:
Originally Posted by Unregistered View Post
Your code samples are quite useful. I do have a question though. . Despite the number of rows I pass in, SF seems to want to return 500, which is consistent with this description (which I actually found pretty funny)

****
By default, the number of rows returned in the query result object (batch size) returned in a query or queryMore call is set to 500. Client applications can change this setting by specifying the batch size in the call QueryOptions portion of the SOAP header before invoking the query call. The maximum batch size is 2,000 records. ___However this setting is only a suggestion. There is no guarantee that the requested batch size will be the actual batch size.___ This is done to maximize performance.
****

Is there an easy way to pull all the rows from a SF table in php?

Thanks-

jon dot bownds at praxisis dot com
If you look at this function:
PHP Code:
function get_accounts($connection)
{
  
$query "Select Id FROM Account";

  
//$query = "Select Id, Name, ProductCode FROM product2";

  
$queryOptions = new QueryOptions(500);
  
$response $connection->query(($query), $queryOptions);
    
// New code starts here
    
if ($response->size 0)
    {
        
$accounts $response->records;
            
// Cycles through additional responses if the number of records
            // exceeds the batch size
        
while (!$response->done)
        {
            
set_time_limit(100);
            
$response $connection->queryMore($response->queryLocator);
            
$accounts array_merge($accounts$response->records);

        }
    }

  return 
$accounts;

the queryMore object will get all the rows, 500 at a time, until all the records are finished.

I have tables that which have over 130,000 records, running on Cron jobs every night to populate a local Oracle DB and I have examples on this site that will give you a complete working export script, using the account object as an example, that can be modified to work with any table

Hope that helps
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 01-29-2008, 01:42 PM
Junior Member
 
Join Date: Jan 2008
Posts: 6

Hello, I am new here. I am just learning the API and its all pretty daunting when you first look at it. So yes these tutorials are very helpful.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 01-29-2008, 01:47 PM
Administrator
 
Join Date: May 2007
Posts: 246
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

Quote:
Originally Posted by ejones View Post
Hello, I am new here. I am just learning the API and its all pretty daunting when you first look at it. So yes these tutorials are very helpful.


Ejones

Thanks for joining the site and please let me know if you have any questions. When I first started using the API with PHP, it was a daunting task IMO. After doing some small setup scripts and working with it everyday, I was able to get all of our scripts (update, download, upsert, etc..) with Salesforce's API using PHP. Anyway thanks for the post and I hope you post on here often

~Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old Yesterday, 09:54 AM
Junior Member
 
Join Date: Aug 2008
Posts: 1

Hi,
I just joined, and wanted to let you know that I am finding your tutorials very helpful. Thank you for your hard work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old Yesterday, 10:06 AM
Administrator
 
Join Date: May 2007
Posts: 246
Send a message via AIM to mike Send a message via MSN to mike Send a message via Yahoo to mike Send a message via Skype™ to mike

Quote:
Originally Posted by dnall View Post
Hi,
I just joined, and wanted to let you know that I am finding your tutorials very helpful. Thank you for your hard work.
Thank you sir! I appreciate it. The reason I started this small community was to help other PHP developers that interface with Salesforce. I found it difficult at first to work with Salesforce's API and thought that if I found something that worked, why not share it

Thanks for joining!

~Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump



Powered by vBulletin


SEO by vBSEO 3.2.0 RC8 ©2008, Crawlability, Inc.

1 2 3 4 5