Salesforce week 11

First week on “the job” brought me to the customer I’ll most likely be assigned to in Stockholm. I spent Tuesday to Thursday there and have already delivered something that will go into production in a couple of weeks. Both exciting and scary… The week was basically spent learning about the project, the phases, deliverables and a whole slew of new terminology. All good stuff. Nothing much else to report for now besides Stockholm being a nice city.

What did I learn

  • Some customers actually use Salesforce Lightning
  • What’s it’s like being thrown in mid-project
  • That I will stay at 3 different hotels in Stockholm over the next weeks

Status after this week

Trailhead points: 70400

Trailhead badges: 70

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Salesforce username/password OAuth flow against a sandbox

We had issues today because our OAuth password flow wouldn’t work against one of our sandboxes although the code worked against production. Instead we got this error:

{"error":"invalid_grant","error_description":"authentication failure"}

After Googling and finding this thread it turned out that when using the username/password flow against a sandbox you have to either relax IP restrictions for login or authenticate against instead of (which of course makes sense).

Below is curl commands for using the username/password flow against a sandbox:

$ curl -d "grant_type=password 

$curl -H 'Authorization: Bearer 00D6E000000Cpmu!AQ0AQIj4...cGCRqmNnYc6dmgLT09VNoIFXJtHvsPGLqrBs0VlK'
   "display_name":"Mikkel Heisterberg","email":"","email_verified":true,"first_name":"Mikkel",
   "addr_country":null,"addr_zip":null,"mobile_phone":"+45 12345678","mobile_phone_verified":true,"status":{"created_date":null,

Quick CLI aliases for Salesforce instance info

Today when at a customer we were trying to figure out the release versions the various sandboxes and development environments and compare this info with the version of the production instance. Of course all this is available from but clicking around got a bit tedious so I whipped up a quick set of bash aliases for the Terminal. Since the output is also available as JSON it was pretty easy. First I grabbed the jq JSON parser for bash and then I wrote 4 aliases for bash:

  • sf_instance – returns the instance ID (e.g. “na44”) from the hostname. This is useful if you are using a custom domain to access the instance e.g.
  • sf_release – shows only the release the instance is on e.g. “Spring ’17 Patch 5.5”
  • sf_status – shows release version, whether active or not and type of instance (production, sandbox etc)
  • sf_status_raw – returns the raw JSON

Below are examples of usage and the ailases are at

$ sf_help
Salesforce CLI actions:
- sf_status
  Shows status for instance ID
  Syntax : sf_status 
  Example: sf_status na44

- sf_release
  Shows release version of supplied instance ID
  Syntax: sf_release 
  Example: sf_release na44

- sf_instance
  Get instance ID from hostname
  Syntax: sf_instance 
  Example: sf_instance

- sf_status_raw
  Shows raw JSON
  Syntax: sf_status_raw

$ sf_instance
$ sf_instance
$ sf_release eu11
Winter '17 Patch 18.10
$ sf_release na44
Spring '17 Patch 5.5
$ sf_status eu11
Release Version : Winter '17 Patch 18.10
Active          : true
Status          : OK
Environment     : production
$ sf_status cs85
Release Version : Spring '17 Patch 6
Active          : true
Status          : OK
Environment     : sandbox

Salesforce week 10

Week 10 it all started to get real… All in all my last quiet week. I actually met my manager in person (she’s based in Amsterdam) and I spent more time playing with the Salesforce platform with a specific focus on Service Cloud, Lightning and Salesforce Lightning Design System (SLDS). I also got my first customer project in Stockholm which will be fun. With the planning on my first customer visits came fun experiments planning flights, hotels etc. All good fun.

What did I learn

  • Service Cloud is easy to set up and one can actually do a very nice, full featured, call center implementation in about 1 hour
  • The Service Cloud Console is actually not Lightning although it looks pretty similar
  • Page Layouts needs to be feed based to look Lightning-like for the Service Console

Status after this week

Trailhead points: 70400

Trailhead badges: 70

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Salesforce week 7-9

Wow! Time is starting to fly by. Week 7 I took vacation and relaxed by taking time off between Christmas and New Years. I got back into the office on Tuesday following New Years Eve and promptly started studying for my Salesforce bootcamp. The bootcamp is in San Francisco and I spent all of week 7 preparing and studying for that. We are very much into gamification as is obvious if you’ve ever visited Trailhead. I flew off to San Francisco on Friday and spent all of Saturday and Sunday settling in and watching a lot of NFL. It was Wildcard Weekend so we had 2 games on Saturday and 2 games on Sunday. Excellent!! It also gave me a good excuse to sit in the bar with my laptop, a beer and NFL. What’s not to like?!

Week 9 was spent in San Francisco for the bootcamp. Monday was Becoming Salesforce which is basically culture emersion and learning about the Salesforce Way including volunteering. Tuesday to Friday was bootcamp with sessions, group assignments and presentations. We also went to go on a tour to the various Salesforce buildings in San Francisco – pretty cool!! In the evenings when we got back to the hotel around 7pm it was hanging out in the bar with the other participants from all over the World (India, Australia, Germany, Netherlands, US, Denmark and the UK to name a few). Then off to have dinner and more beer before bed. All good fun and a great experience. It did rain all week however but we didn’t have time to be outside really so it didn’t matter much.

What did I learn

  • When it rains it pours in San Francisco
  • Cmd-Enter submits a Chatter post in Salesforce Lightning – so happy as it is sorely missing in Salesforce Classic
  • Uber is really cool
  • Apparent Embagadero is a pretty long walk from Fishermans Wharf

Status after this week

Trailhead points: 65550

Trailhead badges: 67

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

.gitignore for MavensMate

Note to self… Exclude the workspace and project files as well as /config from Git so a .gitignore file should be something iike this:


So in bash something like:

$ echo *-workspace > .gitignore
$ echo *-project >> .gitignore
$ echo config >> .gitignore

Salesforce week 6

Again study, study, study… Since last week I completed 2 certifications which takes me to 4 of the 5 I need. The last is Certified Salesforce Service Cloud Consultant which is looking pretty tricky but I have to find some material on the exam. Did my second round of volunteering – felt good. Closing off the year having volunteered 13 hours. Okay I think. Looking into how I can help for a Salesforce project in Africa. Interesting.

From here on it’s xmas, then new years and it’s time to think about other stuff than Salesforce for a while. See you on the other side…

What did I learn

  • Take the exam – go for it!
  • Sales Cloud certification was trickier than I thought it would be

Status after this week

Trailhead points: 57600

Trailhead badges: 59

Certifications: 4 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder, Salesforce Certified Advanced Administrator, Salesforce Certified Sales Cloud Consultant)

Salesforce week 5

All (well most) of this week was spent – you guessed it! – studying for exams… I tried to take the Salesforce Certified Advanced Admin on Wednesday but due to hickups in the system at Webassessor I had to exit the exam and the new time slot I got I couldn’t do. So the exam is now scheduled for Monday. It’s going to be exciting. Whether I pass or not I’m at the point where I need to see some actual questions to gauge what they are asking for instead of simply trying to guess. My take on exams and certification hasn’t changed much and I still think that while certifications are nice the proof is in the pudding. Real experience is the only thing that matters.

On Thursday I thought that the AppBuilder certification should be attainable given the amount of effort I have been putting into studying so on Thursday night, with the rest of the house sleeping, I took the certification test. And passed!! Very happy. I have now have 2 of the 5 certifications I need.

I also did my first round of volunteering and logged 5 hours on that account at our pre-Christmas Party event on Friday for “Cykling uden alder”. While the whole volunteering thing still doesn’t come easy for me I feel that actually doing it makes it easier. I’m also volunteering all day Tuesday next week which will be good.

What did I learn

  • More on SOQL especially using this nice article on SOQL
  • Questions on the AppBuilder certification is tricky and takes careful reading and rereading
  • Testing field level security should not be done as System Administrator as it settings doesn’t apply when you’ve been assigned Read All Data / Modify All Data. Instead clone something the Standard User profile and test with that

Status after this week

Trailhead points: 57000

Trailhead badges: 56

Certifications: 2 (Salesforce Certified Administrator, Salesforce Certified Platform App Builder)

Inspecting IDE traffic

For my studies for the Certified Salesforce Advanced Admin I needed to understand the various code deployment options for the platform including the IDE based on Eclipse. Installing the IDE was pretty straight forward and creating a project and adding an APEX trigger was likewise easy. As I like to understand what’s going on under the covers I went to inspect the traffic but of course everything is encrypted using TLS so I went to my favorite tool for these kinds of tasks – Charles Proxy. This tool allows inspecting all traffic including being a man in the middle of TLS connections.

To make this work however you need to add the Charles Proxy TLS certificate tot the Java keystore of the Java runtime you are using. Please note that adding the certificate to keychain on Mac is not sufficient as all traffic from Eclipse is through Java. On Mac this is the most likely something like the cacerts file in /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/security (replace the Java version with your actual version). To import do as follows:

  1. Get a PEM version of the certificate – in Charles this is done from the Help menu
  2. Open a Terminal and run something like this (assuming Java is on your path):
    sudo keytool -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/security/cacerts 
    -import -v -alias CharlesProxy 
    -file ~/Downloads/Axiom-IdpCert.cer
  3. Agree to trust the cert – otherwise what’s the point?!
  4. Now restart IDE, setup Eclipse to proxy through Charles Proxy (in Settings search for proxy and fill in HTTP/HTTPS proxying)
  5. Configure Charles Proxy to enable TLS proxying for both “” and the actual hostname of your org depending on whether you are using a custom domain or simply the pod name

Now traffic can be inspected and the requests is visible – both the login request to where you can see the endpoints, org id etc. The 15 digit org ID is used to compose the URL for the tooling API so the IDE knows where to send data about classes, triggers etc.

Salesforce week 4

It’s been another week of training, training, training. I’ve watched a LOT of video and started the week studying for the AppBuilder certification only to find out that maybe Certified Advanced Admin was a better place to go after Certified Admin. So Wednesday or so I rebooted and refocused on that certification which really has set me a while back on making another cert by this week or early next week. We’ll have to see how it goes. This week I made a new level on Trailhead and I’m now at the Expeditioner level meaning at least 50 badges and 35k points. Trailhead is not something I have to do per say but I think the modules there are engaging and much more fun than the traditional Help and Training courses.

I’m getting pretty tired of hearing of the business requirements of AW Computing which is the fictitious company used for all the cert training exercises…

Along the way I’ve dived into APEX and Visualforce. APEX is a Java-style programming language for the Salesforce platform and it allows you to write almost all the code in it. It’s very similar to Java but with a nice integration to SOQL (Salesforce Object Query Language) and SOSL (Salesforce Object Search Language) built it. Very cool and easy to use. All APEX may be written in the browser based UI – pretty nice. Visualforce on the other hand is a markup based language (think XPages or JSP) for the platform. Main difference here is that all pages inside Salesforce may be overridden and it seems like all the built in controls are available for me to reuse. This makes it very easy to make pages that span objects and provide context info while editing. Nice. Visualforce is hooked up with APEX allowing you to do use the standard controller (LOTS of functionality provided out of the box) or write custom controllers. It’s incredibly easy and the APEX integration with SOQL makes it easy to do. With 10 lines of Visualforce and an APEX class of 5-6 lines can give you a fully fledged UI showing records from your org.

As I’m writing this I’m waiting for a sandbox for a practice org to be done provisioning. Sandboxing is another nice concept and allows you to build and test in a separate org from your production org while optionally bringing over data from your production org for testing. Sandboxes come at a price but the flexibility and power seems to be worth the money.

Well back to studying…

What did I learn

  • APEX and that an int is integer and strings are single quoted. There are cheat sheets at with the specific APEX one here
  • Of the DML commands (insert, update, delete etc.) upsert and merge are particular cool when coming from traditional SQL
  • Visualforce is nice and has lots of cool components for reuse
  • Repeat after me: “clicks before code, clicks before code”

Status after this week

Trailhead points: 53450

Trailhead badges: 50

Certifications: 1 (Certified Salesforce Administrator)