Monthly Archives: February 2009

SalesForceCFC gets a BIG update!

This is a much improved release. It brings the object’s architecture up to date, improves performance, and offers a few new features.

0.6 -CHANGE LOG- 2/22/2009
– enhancement – auto login
– enhancement – upgraded constructor
– enhancement – more getters and setters
– enhancement – last login added to instance
– enhancement – added utility calls getUserInfo and getServerTimeStamp
– enhancement – upgraded soap handling to minimize code
– enhancement – session handling added to test form to demo persistance
– deprecated – username and password parameters have been removed from login
– deprecated – objDataStruct on return from describeObject()
– fix – validate method getServerURL missing parenthesis
– fix – test form updated to avoid crossover and better cleanup

Download a copy at SalesForceCFC on RIAForge

SalesForceCFC v0.5 now supports pagination with queryMore.

It was brought to my attention, that you can not return more then 2000 records at a time using the query() method in the SalesForce API.

This is done to throttle performance and overhead when using the API. SF does make the data available, but it requires a few more steps.

I’ve integrated these steps and added the queryMore() method to salesForceCFC.

Along the way, queryObject() was updated to now accept a ‘batchSize’ argument.
You can now specify the maximum number of records to return when doing a query.
Similar to doing a SELECT TOP in MS SQL, or a LIMIT in regular SQL.



If there are more records then the batchSize you send in, then you will see a QUERYLOCATOR key in the return struct. It’s a reference to your query on the SF server. It will remain available until there is 15 minutes of inactivity on it.



The ‘queryLocator’ gets passed in to the queryMore() method instead of passing in the queryString like you do in queryObject(). The option to ‘includeRelatedObject’ is still available with queryMore(), as is ‘batchSize’, and ‘startRow’. One thing to note, is that SF will always return at least 200 records. So your batchSize should never be less then that.

With the new updates to this release, you now have the power to paginate any size query using the SalesForce API.

Download a copy at SalesForceCFC on RIAForge