MavensMate unable to reach GitHub on Windows

MavensMate was a popular community plugin for the Force.com platform, built on the Sublime Text IDE (created and maintained by Joe Ferraro) as a free alternative to the official Force.com IDE. Under certain conditions on Windows 7/8 (often proxy/firewall configurations), installation could fail with an error similar to: Installation of Sublime Text plugin failed. This is likely due to the installer being unable to reach GitHub. If you are behind a firewall or using a proxy, you should configure git accordingly (google: git config --global https.proxy) and ensure your HTTPS/HTTPS_PROXY environment variable(s) are set properly. Otherwise, please log an issue on the MavensMate GitHub project. There is an existing GitHub issue with a workaround suggested by Joe Ferraro. The steps that worked for me were: ...

April 6, 2014 · 1 min · Andrea Azzola

Automate SVN/Git Backups of Entire Salesforce.com Organizations

The following solution involves two popular SCM tools (SVN and Git), an always‑on server (I use Windows, but the cloud works as well) and a few free tools. You will need the Force.com Migration Tool, Apache Ant, and Java JDK. Start by setting things up with the following checklist: Java JDK Apache Ant Force.com Migration Tool Cygwin Shell or Git Bash SVN Client (if using SVN) Setup Create a working folder and scripts: ...

October 17, 2013 · 2 min · Andrea Azzola

Dealing with Salesforce Maximum Debug Log Size

When working with Apex code that iterates a lot, you may encounter a truncated log. The error looks like this: MAXIMUM DEBUG LOG SIZE REACHED At the time of writing, the maximum allowed size for a debug log is 2 MB. The default monitoring level for Apex code includes a lot of clutter you usually don’t need (like METHOD_ENTRY, METHOD_EXIT). By common practice, you should put a log filter on the monitored user, or on the classes involved in the transaction by using an override flag. ...

July 18, 2013 · 1 min · Andrea Azzola

Future Count with Apex Code

A simple snippet for counting @future calls in a 24‑hour timespan, useful for monitoring peaks and acting accordingly. Please note: supports up to 50,000 future calls in a 24h timespan. public with sharing class AsyncApexJobUtils { public static integer futureCount() { integer c = [select count() from AsyncApexJob where JobType='Future' and CreatedDate >= :Datetime.now().addDays(-1) limit 50000]; system.debug('#futureCount: ' + c); return c; } }

July 14, 2011 · 1 min · Andrea Azzola