Friday, July 19, 2013

Salesforce known issue: List Custom Settings are not usable in developer / configuration sandboxes

The issue basically means the new feature in Summer '13 of copying custom setting records as part of the refresh has been pretty much rendered useless (unless the custom setting is retrieved by SOQLs, which is less common).

Other than using SOQL, the Support's recommended workaround is to recreate the records... chuckle chuckle.  This is worse than not having the new feature.

The status for fixing the issue so getInstance() can be used again in development is scheduled for Patch 14.0.  A tentative date for Patch 14.0 is August 7th (according to the support engineer I talked to).

Update: As a better (UI) workaround, the affected custom setting record doesn't have to be created - you can just make a small toggle update to it (change then back) and it'll become visible to the code.  I guess the refresh generated record just has to be committed at least once to become "normal".

Update 2: The feature (copying custom setting records to sandbox) now appears to be dead.  According to the support engineer I talked to, the patch was rolled back as there's serious issue with it, and whole feature is now unusable.
"At this time, my R&D team has determined that the fix to allow Custom Settings to be copied into Configuration and Developer sandboxes will be fixed in a major code release. Due to the complexity of the issue, this cannot be fixed sooner."
And I don't think the "major code release" means Winter '14.

Thursday, July 11, 2013

Salesforce OAuth in C#

Used a few links to get my trial run going with a C# project that connects to the Tooling API via REST.

Needless to say I was looking into the Tooling API/REST API guides for force.com and MSDN for C# classes a lot as well.

Wednesday, July 3, 2013

Build a local environment for Salesforce data analysis with free tools

Salesforce.com is actually great for data analysis.  Its reports and dashboards are fantastic tools for quick analysis over the relational data in objects.  In fact in terms of integrating relational datastore and common BI needs, there isn't really anything better out there.  However the level of integration and ease of use has its downside: sometimes you just can't optimize for two different goals.  Compromises inevitably get introduced, as many long time SFDC users have realized.  There's no arbitrary join on the relational side.  There's volume and performance limits on the analysis side.  And there are other things related to the multi-tenant model different people love to complain about.  You just can't help but wonder, wouldn't it be nice if I can have an environment to manipulate and view my data with more freedom?  Well, you already can, if you have a nice ETL tool with a capable data warehouse.

What if I can't affort Cast Iron and Netezza some big blue guy really loves to sell to me?  What if I don't even have enough money to play with the nice SQL Server/SSIS guys?  

Well, where money falls short is a perfect point to start with some creativity.  I recently wired together Jitterbit Data Loader with MS SQL Server Express 2012, which provided a decent relational store for playing with Salesforce data.  Both tools are free.  SQL Express provides a 10 GB per database storage that should be plenty for your big objects - if you have even bigger ones, I just don't know why you can't afford expensive enterprise tools.  :-)  Jitterbit Data Loader provides direct transport from Salesforce to SQL Express.  The process of putting them together is fairly straightforward.  I only stumbled on a few points (info here assuming you're familiar with both tools):
  • To make SQL Express remotely available (if you need to run the two tools on different computers), use a fixed port (1433) for it's TCP/IP service instead of the default dynamic port.  Also the config screen is a little confusing (in 2012 version at least) - make sure to change the port setting for "All IP", otherwise the dynamic setting in All IP will overwrite whatever the change you have in for specific IP addresses (v4 or v6).
  • Use ODBC for the database connect in Jitterbit.  JDBC (specifically jTds) just plain doesn't work.  I've tried everything I know - use SQL Server authentication instead of Windows, correctly separate the instance name, no db name - eventually I just hand built the whole connection string but nothing worked.  ODBC, on the other hand, only needs one small tweak: use the instance=sqlexpress paramenter (\sqlexpress notation doesn't work).
  • Make sure the target tables in SQL Express have enough length for the fields (equal or bigger than defined in SFDC).  Otherwise the operation in Jitterbit ends with nativeError=8152, basically Msg 8152 in T-SQL, meaning "string or binary data would be truncated".
I think we can safely assume you can swap in another SQL database, for instance, MySQL, as long as you have the proper ODBC driver in place.  Who knows, Oracle XE can even work (it only has 4 GB per db though).