Using Git with Salesforce and distributed teams

by Patrick Connelly posted on July 21, 2014

Introduction

I’ve been asked several times (and have presented a couple of times) on how our team handles doing Continuous Integration (CI) and Continuous Deployment (CD) with a distributed team. However one of the points that I’m always asked is specifically how we use Software Configuration Management (SCM) with this processes. For this blog post I’m going to do a deep dive into our process.

NOTE: This process is by no means the end-all-be-all process for everyone. This is just what we have come up with (generalized for public consumption) over several years of developing on the Force.com platform


The best feature in Salesforce Summer '14

by Patrick Connelly posted on June 26, 2014

Ok, so it might not be the BEST feature ever, but it is a feature after my own heart.

If you’ve ever done anything with pricebooks, you know how painful they can be. And worst of all how you cannot create a Pricebook2 entry in a test. This means that you have to pull a Pricebook2 from your orgs data which means you have to enable the dreaded SeeAllData.


Snapshotting objects in Salesforce with apex

by Patrick Connelly posted on May 20, 2014

A common issue that we have is a need to see information about Cases when it is created. We do this to do some analysis about how a case changes (primarily to verify how good our automated tools are working). To achieve this, we made a generic snapshot object that will store a JSON version of our data. We chose JSON for it’s portability and it’s ability to dump into other systems.

The Object

To start out we’ll need a place to put this data, so we created the object with the following fields. Download object.

  • JSON_Data_{0-9}__cRequired – These are several LongTextAreas that stores json data
  • Object_Name__cRequired – This is the name of the object that was snapshotted
  • NameRequired – An auto number, just used for identification
  • Case__cOptional – This is used for our case specific snapshot to link a snapshot back to a specific case

Board games that all board gamers should own

by Patrick Connelly posted on February 17, 2014

Now I know this is a bit out of the realm of “normalcy” for my blog, but I think there is a bit of overlap in people who would read this, and people who play board games. This list was generated by several suggestions of board gaming friends of mine. It is by no way 100% accurate or complete. We tried to get at least two suggestions per category and from there you can decide.

If we missed your favorite board game, or you think one doesn’t belong, let me know in the comments. And, feel free to buy me any board game I missed to convince me about it.


Sending pushover messages via Electric Imp

by Patrick Connelly posted on January 02, 2014

I recently got an Electric Imp april board and developer card. I’m really digging it and am planning on making a monitoring solution for my garage (including doors and freezer temps). In addition to reporting the data back via the agent, I wanted to add the ability to send a pushover notification to my phone on events. I wrote a quick method to do this, and thought it might be useful to others.

//Agent code
function send_pushover(title, message, priority) {
    local url = "https://api.pushover.net/1/messages.json";
    local token = "XXX_TOKENGOESHERE_XXX";
    local user = "XXX_USERGOESHERE_XXX";
    local headers = { "Content-Type": "application/x-www-form-urlencoded" };
    local data = {
        "token": token,
        "user": user,
        "message": message
        "title": title,
        "priority": priority
    }
    local body = http.urlencode(data);
    local response = http.post(url, headers, body).sendsync();
}

//To use, send_pushover("My title", "My message", 0)
//For more on priority see https://pushover.net/api#priority

Adding git status to the bash prompt

by Patrick Connelly posted on October 24, 2013

After talking to a friend of mine Jeff Larkin about bash prompts, I decided to modify what he did into a single line bash prompt. By adding the following to your .bashrc you’ll get the branch your on in git (if current directory is tracked), a color denoting the status of the branch as well as the return code of the last command (if non-zero)


Even better remote notifications with Irssi

by Patrick Connelly posted on July 26, 2013

Last month I wrote a Irssi plugin that pushed messages from Irssi to Beanstalkd. I was pretty happy with it, but I wanted more. So, I’ve improved it. The new version pushes in a slightly more normalized json payload to one of two beanstalk tubes. The tubes are configured for here and away. Then the python script that consumes them either displays it via a notification pop up, if sent to the here tube, or to pushover if sent to the away tube.


Deleting all scheduled jobs in Salesforce with CasperJs

by Patrick Connelly posted on July 26, 2013

Preface

In a previous post, I talked about how to log in to Salesforce with CasperJs. At the time I did not have a good example of what to do next with it. Well, this week I had a need that is something that other people can relate to.


Logging into Salesforce with CasperJs

by Patrick Connelly posted on July 09, 2013

Preface

Anyone that has ever had to deal with editing multiple Entitlement Processes in Salesforce will know the pain of having to do this in multiple environments and making sure you don’t fat finger this manual process. In the past when I’ve had to do this, I’ve either sucked it up and did it manually, or did it with Selenium. I wasn’t a big fan of either of these solutions since I’m a command-line kinda guy. That’s when I was told about CasperJs and I think I’m in love.


Better remote notifications with irssi

by Patrick Connelly posted on June 28, 2013

This has been deprecated in for the new script and configuration.

History

As I wrote about a long time ago I use to use a custom script with irssi to push to mumbles. Well, mumbles has gone defunct and I couldn’t really find a good growl client for linux. Plus with me traveling into the office weekly, it’s just not going to work well since growl is more push notification. So this lead me to research a true messaging system to try it.