Tuesday, August 5, 2014

Skeleton code for Batchable/Schedulable classes

I wish Force.com IDE had a quick option to generate a skeleton class for Batchable classes.  It has one for test classes, so why not this one?  For now I just paste in my own skeleton code to save typing the same stuff every time.
global class BatchableSample implements Database.Batchable, Schedulable { global Database.Querylocator start(Database.BatchableContext context) { // TO-DO: construct the actual query return Database.getQuerylocator([Select Id From Account Where CreatedDate = TODAY]); } global void execute(Database.BatchableContext context, List scope) { } global void finish(Database.BatchableContext context) { }

// schedulable global void execute(SchedulableContext context) { } }

Friday, August 1, 2014

Salesforce connected apps settings are not copied to sandbox

So for me this was learned first in practice, then confirmed by Salesforce knowledge base article 194090.  When a sandbox is created/refreshed, custom connected apps configured in production will be not be copied, even though they're part of the configuration/metadata.  This is true for full sandboxes as well.  The standard connected apps (Salesforce1, Chatter Desktop, etc.) will obviously still be there.

The KB article also pointed out that you can't reuse the same API name when you recreate the apps.  It's probably the result of this known issue.

These oddities combined with the still confusing UX with connected apps - create in one place (Create > Apps) and edit in another (Manage Apps > Connected Apps) made Connected Apps still feel like a beta feature.