Speaker Academy: Better than gouging your eyes out with a rusty spoon!

Like many people, when given the choice between speaking in public, and gouging my eyes out with a rusty spoon, I’d opt for the spoon.

However, public speaking happens to be a very useful skill, and very good for your career. Luckily for me, there was a third option… two members of the salesforce community here in London run an excellent programme to help people like me learn how to speak in front of others.

Jodi and Keir first ran their speaker academy course last year, with a second course running early this year. I was unable to attend the first two, but as they say, third time’s the charm, so I signed up and hoped for the best.

So what is speaker academy?

It’s a course run by salesforce MVPs, Jodi Wagner and Keir Bowden (aka. Bob Buzzard) with the intention to help people in the salesforce community learn how to speak in public, and encourage a more diverse range of people to participate in user groups, community events and even World Tour/Dreamforce.

The course goes for 6 weeks, and covers topics like; Choosing a topic, writing an abstract, developing a presentation, body language and overcoming fears. Each session runs for about an hour and at the end we are given homework. Over the course of the 6 weeks, we develop a 5 minute lightning talk, with the graduation being to present this talk at a user group, in front of real live people!

To add a bit of encouragement and competition, there would be a prize for the speaker that the audience thought was best, last time it was a speaking slot for Londons Calling, and this time, up grabs was a speaking slot for Surf Force! (which I wasn’t in the running to win, since I am co-organising Surf Force)

If you want to read more about it from the facilitators perspective, check out Jodi’s blogs (here, here and here) or Keir’s blog here.

How did it go?

Our graduation was held at the August London Salesforce Developer Meetup. I’d be lying if I said I wasn’t nervous, as I’m sure my class mates were. We had all developed and practiced our talks in the relative safety of a small group, by the end of the course we were all pretty comfortable presenting in front of one another.

This was different, this was getting up in front of 50+ people and giving a talk, something I’d not done since being ‘forced’ to in high school! I think I made it both easier and harder for myself by talking about schemapuker… easier in the sense that I wrote the tool and of course have deep understanding of it, harder in the sense that because the topic was quite ‘personal’ to me, I really didn’t want to make any mistakes!

Overall, I think my talk went well, I feel that I probably spoke a bit too fast, I’m not sure how close I was to the 5 minute mark, but to me it felt like it was over in 30 seconds! I definitely need to work on body language and movement (I didn’t do much of it). However, I did get positive feedback from people in the audience, with a few people coming up to ask more about schemapuker afterwards.

My fellow classmates presentations all went without a hitch, at least from where I was sitting.

Connor went first, talking about the advantages of using middleware.

Followed Oliver, showing us how to supercharge our sandbox refreshes.

Next was Jin, on how to make life easier for your sales team with automation

I was up after Jin, presenting schemapuker (slides here)

After my was Kyra, telling us how we can help the scouts

and last but not least, was Sean who spoke to us about securing salesforce communities.

The winner of the Surf Force slot was Sean Dukes, and I look forward to seeing him at Surf Force!

So what did I learn?

One of the things I struggle with (and this applies to my blog too) is having something interesting to say. I’ve often found myself thinking “I could talk about that” or “I should write a post about that” and then going “nah, it’s been done” or “nah, no one would be interested in that”. What I had not considered, is that everyone has unique exiprence and a unique take on things, so while maybe someone has written or spoken about something before, what they have to say and what I have to say may be different.

The fear of getting it wrong/looking stupid/being seen as a fraud goes hand in hand with this, aka. impostor syndrome. Jodi and Kier helped us to, at least somewhat overcome this and to stop comparing ourselves to others… In reality we are all in the same boat!

I learnt that its important that you talk about something you actually care about/are interested in. When it came time to write abstracts, we had to prepare three and read them to the class. That really drove home how obvious a persons preferred topic was, and how it comes across in your talk.

I also learnt that, reading from a script or from your slides is NOT a good approach, and your slides/presentation should be there to compliment and support your talk, not contain it! As Keir said many times, “less is more”.


I want to sincerely thank both Jodi an Keir for running the class, they put a lot of effort in to preparing materials, organising, giving feedback and actually teaching the course and it is of great benefit to the graduates and the community at large. Many people who have done the course have gone on to speak regularly at user groups and at other events like Salesforce World Tour. Jodi and Keir should be proud of what they are doing, and I’m grateful for the opportunity to have attended.

Will this be the start of an illustrious speaking career? …Maybe not. Do I still think I’d rather gouge my eyes out with a rusty spoon than give a talk? Not at all, I hope to be able to talk again at another meetup and improve my skills!

Supercharging a cheap GPS Tracker – Part 1: Hardware

Recently my motorcycle was stolen, which is not an experience I would like to repeat. Motorcycle crime in London is quite prevalent, and unfortunately, I didn’t secure the bike as well as I should have.

Luckily I was able to find and recover it with minimal damage, as it was dumped quite close to my home.

I decided I needed to beef up security, so aside from a chain and disk lock, I also wanted an alarm and a GPS tracker.

Having a look on amazon, I came across the ‘XCSOURCE Vehicle Tracker‘ for £14.99. This seemed very cheap for a GPS tracker, as I’d seen them advertised for hundreds of pounds in other places, but for £14.99, what do I really have to lose?

It seemed to have the basic features I wanted, with real time tracking, SMS capability and TCP/IP reporting (e.g sending data to a tracking service). I did notice that in the pictures there were many unpopulated pads for other functions, so I thought maybe I could do more with it than advertised.

Turns out my hunch was correct, it was very easy to expand the capabilities of the device, as well as get the data in to a tracking service!

Initial Setup

You will need a SIM card in order for this device to work, the device uses the 2G (GPRS) network, so make sure the provider you choose still has a 2G network.

In the UK, ee, O2 and Vodafone all provide 2G networks. Three does NOT.

I purchased a sim from giffgaff as they use O2’s network and are very cheap. I pay £5/month and get 100mb of data and 500 texts. The device tends to use ~50mb of data per month and ~100 texts, but of course YMMV.

If you just want to use the SMS functionality, all you need to do is pop the sim card in and connect up the device, however there is some configuration required if you wish to use it with a tracking service (which I will cover in my next post)

It is a good idea to change the password for the device, the default is 123456. You can do this by sending password<oldpassword> <newpassword> (e.g “password123456 111111”) to the device vis SMS.

Hardware Modifications

As shown in the pictures on amazon, you need to open it up to put in the SIM card. You can also see that there are several pads on the board that are unpopulated. This particular GPS tracker (often known as a GT06/GT02) had quite a few more features than listed, and these can be accessed by simply soldering wires to the pads.

I removed the standard wiring, and soldered in new wiring to the following pads

  1. ACC – This is for sensing if the vehicle is on, connect it to power that is switched by the ignition
  2. OIL – This is used for disabling the vehicle remotely (which i’m not currently using)
  3. MIC+ and MIC- These are used for an optional microphone (you can call the device and hear what is going on in the vehicle, no use on a bike but probably handy on a car)
  4. + and – on the back of the device – This is for a speaker (you can yell at the person who is stealing your vehicle!)
  5. VBATT and GND – This is for your backup battery (more details on that below)
  6. GPSTX and GPSRX – This is for the data stream coming from the onboard GPS (more details on that below)
  7. TX and RX – This is for the data coming from the device itself (more details on that below)

With that done, you should have something like this.


Once you’ve done that, you can re-assemble the device. With the original wiring removed, the new wires have no issues fitting through the opening for them at the end.

Battery Backup

Probably one of the most useful things you can enable the battery backup. Not only will this help to prevent the GPS tracker from draining your vehicles main battery, it also has a feature that it sends an SMS to you with the devices location as soon as it detects a power cut. So even if thieves find the main wiring and cut it, it will keep transmitting location, as long as the backup battery remains connected/charged.

If you get ahold of a battery mobile phone charger, they normally contain a 18650 3.7v cell, you can use one of these (or any other 3.7v battery really) as backup for the GPS.

Alternatively, you can buy a pair of 18650s here for £10.49 if you don’t have some laying around.

A word of caution though, soldering to batteries is not ideal, you may be better suited either getting a hold of batteries with tabs/wires, or using a holder. If you must solder, be very quick about it as heat is bad for these batteries.

Once you’ve got your battery, you simply connect it to the wires you soldered to the VBATT and GND pads earlier, I have a plug on either end of mine so I can remove it easily if required

Serial Output

You can gain access to both the device’s serial output, as well as the GPS module’s serial output from the pads on the board, the serial output is useful for debugging, as it reports overall status (e.g battery, GPS, GPRS, etc) every few seconds.

The GPS output is useful if you need data from the GPS for another purpose e.g a custom navigation, digital dashboard, etc.

The pins ‘GPSRX and GPSTX’ on the back side of the board are for the GPS signal and the ‘TX’ and ‘RX’ near the USB port are for the console. Remember for serial to work you also need a ground, the power ground (‘GND’ at the bottom of the board with the other pads) works fine here. The serial voltage is +5v (so be careful when using it with 3.3v devices like raspberry pi’s). The GPS operates at 9600bps, 8-n-1 and outputs standard NMEA sentences. The console operates at 9600bps, 8-n-1 and outputs text.

Next Steps

Once all this is done, find somewhere inconspicuous to mount the device on your bike or car, and connect all of the lines you wish to use (+12v, ACC, backup battery, etc)

In part two, I will detailing how you can use this in conjunction with software called traccar for logging and tracking of your vehicle, which really unleashes the potential of this device!

…and now for no reason: Emoji’s in your Wi-Fi name!

A while ago, I came across someone using emoji as a Wi-Fi network name (SSID), I tried to do the same on my wifi router (I wanted the delightful smiling poo emoji 💩) but my router, sadly wouldn’t let me.

I saw it again the other day, and I thought I’d have another try, after all this was years ago and I have a much newer router, and newer version of DD-WRT running on it.

But, I was rudely told that what I was trying to do was illegal.

Not to be deterred, I thought I’d try changing it via SSH… but that was not to be either.

Inserting the emoji returned “p)” which was not accepted, I did also try the unicode char for it “U+1F4A9” but that didn’t work either.

Turning to google, I wondered if anyone had done this successfully before, but all I could find was this article, This was done on the same model of wireless router as I own, but using the stock firmware.

But it did give me a good idea… So taking the same approach as in the article, but skipping straight to the server-side method, I used chrome dev tools to inspect the request;

So that is all well and good, but I need to replicate the request with new parameters, so turning to postman

Fingers crossed, I hit send on the request… and low and behold!


So far I’ve not had any issues with modern-ish devices finding/connecting to it, however I did leave the 2.4ghz radio of my wireless router alone, so that older devices can use it if need be.




SchemaPuker v0.3 Released!

After far too long between, I’ve finally had a chance to release a new version of SchemaPuker

This release contains the following changes;

  • Objects are now shown with both their label and API name in the select list, entering objects in the text box is still done by API name only as before.
  • An issue with some custom object relationships not being drawn has now been resolved
  • Error handling has been further enhanced

It is live now at: https://schemapuker.herokuapp.com, so please give it a go!

As always, if you have any suggestions, comments, bugs or need help you can send me a tweet, leave a comment, or send me a message!

Organising Surf Force 2017: The best salesforce adventure you will have this year!

As you may (or may not be…) aware I am part of the team organising Surf Force.

What is Surf Force you ask?

Well it’s a salesforce community event, but not like any other that you may have been to. Through surfing, we encourage you to take a chance and to step out of your comfort zone.

Surfing is something that not a lot of people have done, and that people might find scary or challenging… But when you have people around you who are there to guild you and help, you will realise it wasn’t so hard after all.

This is a lesson that we can apply to the salesforce community, and the community at large. We can all step out of our comfort zones, learn something new, do something great, and help others. Surf Force is here to prove this to you, teach you new things and empower you to do this.

I helped with Surf Force in 2016 (Which was held in Aberavon, Wales) and loved the concept and what the founder, Shaun Holmes was trying to achieve. Shaun’s enthusiasm for the event, and helping others was inspiring and I knew that in 2017 that I had to be part of it and help to make it bigger and better!

Organising Surf Force 2017

Organising an event takes a lot of hard work, even more so when everyone has day jobs and their own lives to live. All of the team work full time and have varying family and other commitments, and to make things even more challenging, we are holding the event in a different country!

To spite the challenges, the team of Shaun Holmes, Kerry Townsend, Scott Gassmann, Jenny Bamber, Lauren Touyet and myself have made amazing progress on making Surf Force and we had our first trip to Bundoran, Ireland to scope out the venue for this years event, talk to local contacts and charities and, of course, go for a surf!

If you’ve never been to Bundoran (or to Ireland in general) then you are missing out, it is an absolutely gorgeous place and the people there are incredibly friendly.

The venue we have chosen for Surf Force 2017 is the Great Northern Hotel, which is right on the beach had has some excellent facilities for the event, as well as for leisure (pool, spa, sauna, golf course, etc)

We also met up with the amazing people at the Donegal Adventure Centre, who will be providing the surfing lessons and all of the kit required. The organises and instructors there are amazing and really make sure that you are both having a good time, learning and being safe.

I am very excited to be a part of this event and to work with the amazing group of people who are organising it and I hope that you all will come along. I also wish to thank our sponsors, who help to make events like this possible. So please check out Taskfeed and Good Day Sir!

To find out more about Surf Force, visit the website here, follow us on twitter, instagram or facebook!

Generating multiple documents programmatically in Salesforce

A colleague recently came to me with a ‘problem’ that he was scratching his head about.

His requirement was to generate multiple documents (PDFs in this case) from data stored in varying objects in salesforce, which he needed to be zipped and attached to an object or otherwise able to be downloaded.

My initial answer to him was simple, just install Conga and be done with it. Unfortunately, as this particular organisation is unable to use anything that was hosted on AWS (I know… ) Conga was out.

So after thinking a little bit more, I remembered that, thanks to the PageReference class, you can ‘access’ visualforce pages programmatically (amongst other things), and store the resulting output in a Blob.

For example, lets say you have a simple visualforce page that displays some information from an account record.

<apex:page standardController="Account" standardStylesheets="false" showHeader="false" sidebar="false" renderAs="PDF">
            <h1>Account Summary for {! Account.Name }</h1>
                <tr><th>Phone</th>  <td><apex:outputText value="{! Account.Phone }"/></td></tr>
                <tr><th>Fax</th>    <td><apex:outputText value="{! Account.Fax }"/></td></tr>
                <tr><th>Website</th><td><apex:outputText value="{! Account.Website }"/></td></tr>
            <p><apex:outputText value="{! Account.Description }"/></p>

In this example, we will generate some of these ‘Account Summary’ PDFs for a given list of accounts. Its very simple really;

//some accounts for this example
List acts = [ SELECT Id, Phone, Fax, Website, Description, Name FROM Account LIMIT 10];
//the resulting list of blobs containing the generated pdfs
List generatedPdfs = new List();
  for(Account a :acts) {        
    //PageReference for the visualforce page we wish to use
    PageReference pdf = Page.Account;
    //provide it with the require parameters
    pdf.getParameters().put('Id', a.Id);
    //access it and store it as a blob
    Blob b = pdf.getContent();

Now we have a blob of each page, and bear in mind that they don’t all have to be the same page, I am simply using a loop to generate multiple PDFs without having to write a bunch of visualforce pages for this example.

With those blobs, we can do a few things. We could post them to chatter, attach them to a record, or post them to a content library.

We could also, using a very cool ‘library’ I found called ‘Zippex‘ we could zip them all up, then post to the resulting zip to chatter, content, attachments, etc.

This isn’t just for PDFs. Using the contentType attribute of visualforce, you could output a bunch of CSVs, or other document types (see here for some more on this) and zip/attach them as well.

Some things to bear in mind;

  • If your visualforce pages perform SOQL, looping through them may cause you to hit query limits
  • Generating lots of documents will cause you to hit the heap size limit
  • Zipping lots of documents may cause you to hit the CPU limit
  • There is a reason that apps like conga handle this off platform.

    However, if you’ve got some existing visualforce pages, can accept these limitations and need a way to generate and attach documents without a tool like Conga, this is an option for you.

    Here is a link to some more example code on my github

    SchemaPuker v0.2 Released!

    Try the new version right now at https://schemapuker.herokuapp.com/ 

    I have been getting a lot of feedback about SchemaPuker since its launch, and many, many people have tried it out
    The response has been far more than I expected, with many tweets and even a couple of blog posts about the tool;

    Lucidchart + SchemaPuker: The Winning Combination for a Salesforce Consultant
    Phil’s Salesforce Tip of the Week #220

    I am so glad people are finding the tool useful, I’ve had a few feature requests and bug reports, which is why I have now released a new version, with the following changes;

    • You can now select if you want all fields displayed, or only relationship fields
    • Much better error handling!
      • Before, if something went wrong, you’d either get an ugly error page, or nothing at all, now you will get some (hopefully) useful details if something goes wrong
    • Huge speed increase, up to 5.9x faster in my super scientific benchmark*
    • All relationships should now be visible, some users were reporting that the lines connecting them didn’t show in lucidchart
      • I threw my entire dev org at it, and was able to see all the relationship lines automatically, if you are still experiencing this issue please let me know!
    • Minor text fixes

    I have had suggestions for more new features, which I do plan to include in future releases, so please keep them coming!

    If you have any suggestions, comments, bugs or need help you can send me a tweet, leave a comment, or send me a message!

    * Super scientifc benchmark method: timing the old and new method several times and working out the average difference

    Why I love/hate custom metadata types: Introducing Meta Dataloader

    A semi-recent feature of salesforce is Custom Metadata Types. The are like custom settings, but better in many ways.

    One of these is very important…  they are deployable! Just like any other piece of metadata (fields, objects, classes, etc) Anyone who has ever dealt with custom settings before, knows what a gigantic pain in the ass it is to keep environments in sync.

    However, they have some limitations… While they can be accessed from within apex classes, unlike custom settings they cannot be modified programmatically (well, they can but its not that easy).

    Also, unlike custom settings, there is no easy way to populate them in bulk (e.g via workbench, dataloader, etc). Salesforce do give you an option, but it kind of sucks (it involves deploying code to your org, etc, etc)

    Faced with having to load ~200 custom metadata type records, and not wanting add an app to my org when I didn’t have to. I decided to write a tool instead.

    Presenting: Meta Dataloader!


    This is a similar tool to SchemaPuker (infact, i reused a LOT of the code from it) that performs one specific task, it can take a CSV and create custom metadata type records from it.

    Once you’ve logged in, you simply choose the Metadata type you wish to load records in to, and if you want to upsert or delete records.


    You then need to upload a csv of the values you wish to load, with the headings matching the field API names (similar to workbench)


    Click submit, and the records will be upserted or deleted


    The tool is pretty basic, but it solves a problem. It took me ~3 hours to put together, so it may have issues.

    If you find it useful, let me know, and likewise let me know if you find any bugs.

    The code for this is available on my github

    SchemaPuker: How it came to be

    If you haven’t seen my post about SchemaPuker, check it out here.

    The story begins last year, when a colleague of mine David Everitt built a handy tool for generating ERDs. It was essentially a visualforce page / controller that allowed you to choose objects and then it would output some text in the format of a PostgreSQL Schema file that you could then import in to Lucidchart.

    PostgreSQL schema files are relatively easy to generate (as they are essentially plain text) and Lucidchart was the diagramming tool of choice where we worked, so this all made sense.

    I saw this, and thought it was a brilliant idea. ERDs are something that are very often part of design documents, proposals, etc. Even if you are building new functionality, often you are using some, or all of the existing data model, so having a way to get this out of salesforce easily was very helpful.

    You can read more about David’s tool at his blog, SlightlyTechnical, including how to try it yourself.

    However, a visualforce page / apex class has its limitations.

    • If you were doing a discovery, perhaps you don’t have credentials to organisation you need to chart, or if you do perhaps you don’t have a sandbox, or permission to install anything in one
    • If you do have credentials and a sandbox, you then need to add the visualforce page and controller in to the org
    • It would just output the results into the page itself, making it harder to import into your charting tool

    So I decided I would make a new version of the tool, plus it was a good excuse to play with the salesforce metadata API, which I hadn’t had a lot of exposure to at the time.

    I decided I would throw together a Java application to do this, I had written plenty of little console based apps in the past, but had never done anything with a GUI, so this was yet another learning opportunity. I built the app using swing, the force.com WSC, utilising the metadata API and the SOAP API to handle authentication.

    The application worked fine and had all the same functionality as its visualforce counterpart, with the added bonus that it would generate a text file, rather than display the output. After that, I got busy with life and forgot about it all.

    This year, after giving my blog a bit of a refresh and thinking about what I could write about, when I remembered the tool. I dug out the source code, looked at it, cringed and thought about how I could make this thing better.

    The obvious solution here was a cloud based app. Something that required no installation or setup, and was easy to use. Given that I already had a my previous iteration written in Java (and Java is the language I am most comfortable with) heroku seemed like the best fit for hosting this.

    Life got in the way again, and it wasn’t till after a trip to surfforce (see my writeup here) and a discussion with Dave Carroll from salesforce that I thought about it again.

    Dave was telling me about the work he had done on the force.com cli, and the plans to extend the tool. I told him about my at-the-time named ‘Salesforce ERD Tool’ I was planning to move to heroku. He suggested (quite rightly) that that was a rather boring name, and came up with the idea of calling it ‘SchemaPuker’, and the name was born.

    After surfforce I decided I would tackle this. I had never written a java web-app, nor had I used a web framework or deployed anything to heroku before. So with yet another great learning opportunity I set about learning how to do this.

    I chose Spring MVC as my framework, mostly due to the huge amount of documentation for it, its uncanny similarity to visualforce and Spring Boot, which made testing the app locally *really* easy, and allowed for no xml config files.

    I decided I was going to use the salesforce lightning design system in for the UI of my application, it looks nice and there is an excellent guide available for it.

    Next, was taking a look at authorisation. My previous tool used the SOAP API for authorisation, however this was not going to be suitable here. Using OAuth2 made much more sense (so much so that I made a post about it here).


    Once I had authorisation sorted out, I was able to reuse most of the core of my original application, and once I had the UI tidied up, I had a minimum viable product. I do have some ideas for enhancements for the next version, such as graphical output, stored groups of objects and a better interface for choosing objects.

    SchemaPuker: ERDs made easy

    SchemaPuker can be accessed here: https://schemapuker.herokuapp.com/

    Read on for more information about SchemaPuker!

    Often, we need to produce diagrams of our organisation’s data model (aka. ERDs). This will be especially true for those of us who are consultants.

    Perhaps you are doing a discovery or analysis and need a a copy of the current data model, or maybe you need a ‘current state’ and a ‘to be’ for comparison, or you are designing new functionality that connects with an existing data model, or documenting functionality after completion.

    Now, salesforce does have a tool to visualise the data model, called Schema Builder, however this cannot export the model, nor can it be customised without actually changing the data model itself.

    To solve this problem, I came up with… SchemaPuker! (thanks to David Carroll for the name! and to David Everitt for the idea in the first place!) For more about how it came to be, and the name click here

    But for now, SchemaPuker is a fairly simple tool, It allows you to authorise to salesforce, get a list of your objects and export them as a PostgreSQL schema file. This file can be imported in to Lucidchart (and other tools) in order to generate an editable ERD.

    The tool itself is very simple to use, first, navigate to https://schemapuker.herokuapp.com, choose if you are using a Production/Developer Org or a Sandbox and click ‘Login’. You will then be asked to enter your salesforce credentials and to authorise SchemaPuker to access your org.

    Screen Shot 2016-09-01 at 16.36.36

    Once authorised, you will be given a list of objects inside your salesforce org. You then select the objects you wish to be in your ERD by holding down command (or crtl on windows/linux) and clicking, or by typing the API names in the ‘Selected Objects’ box


    Once you click submit, you are given the PostgreSQL Schema. You can either copy/paste this into lucid chard, or click the ‘Download’ button below the output.


    Next, log in to Lucidchart and create a new drawing, click ‘More Shapes’ at the bottom and then tick ‘Entity Relationship’ and press ‘Save’


    Now, you can either import the downloaded file from SchemaPuker by pressing ‘Choose File’, or paste the output in to the box below. You can ignore steps one and two in the import window.


    You will now see your salesforce objects in the sidebar just under the ‘Entity Relationship’ panel. You can drag the objects on and the relationships between the objects will be automatically created.


    You can click add new shapes from the ‘Entity Relationship’ panel to extend your ERD as required.

    Thats it! Please try it out and let me know how you go!

    Please Note: This is still very much beta, and is ‘minimum viable product’. However I am working to improve it on a regular basis, and would love to hear your thoughts.
    It is limited to ~30 objects per export and may crash in fun and exciting ways. The app does *not* store any data, nor does it make *any* changes to your salesforce org.