Dreamforce 2017, What an experience! Part 2: Dreamforce itself

The dust is still settling from Dreamforce 2017, having only gotten back to the UK Monday afternoon, but I wanted to share my thoughts while they were still fresh in my mind. This is part two of of this blog, the first is here, about my experience speaking at Dreamforce. This blog is about Dreamforce itself.

Dreamforce 2017!

So Dreamforce is over for another year, and it was just as huge and insane as ever. This is my second Dreamforce, with my first being in 2011. It certainly is a lot bigger than when I last remember! As anyone who has been to Dreamforce knows, it is an overwhelming experience and unlike any other tech conference in existence.

For those that don’t know, Dreamforce is Salesforce’s annual user/partner/customer conference and is held each year in San Francisco, CA. This year is was four days from 6th – 9th November and had speakers like Michelle Obama and performances from Alicia Keys and Lenny Kravitz (see, not your usual tech conference!) plus over 2700 sessions from Salesforce employees, partners and customers (one of which was mine!)

Trailhead was very much at the forefront this year, with an entire ‘Trailhead Area’ in moscone west, decked out with fiberglass rocks, trees, grass and even a waterfall. The road between moscone south and north was closed with ‘Dream Valley’ being created, completely covered in astroturf and home to food stands / cafe’s, lots of seating, a music stage and even a rock climbing wall. There was a trailhead quest to complete, a Dreamforce specific badge and plenty of trailhead swag on offer (including the coveted trailhead hoody).

As I experienced the first time at Dreamforce back in 2011, it is one of these conferences you make all of these plans to see 100 sessions and catch up with everyone you know in the community. In reality you and end up seeing 10% of the sessions you planned to, and see more people than you ever expected to. This may sound like a bad thing, but so much of the value you get from Dreamforce is from the people you meet, the sessions you never thought to attend and the demos you see from Salesforce and from other partners/vendors. A key to enjoying Dreamforce is not worrying too much about what you have planned, and just go with the flow of the week.

Dreamforce is where Salesforce makes its big product announcements for the year and holds Developer, Admin, Trailhead and many more keynote sessions. The theme of the main keynote was ‘We are all trailblazers’ highlighting the economic impact salesforce has had, the fourth industrial revolution and the impact it continues to have on the world, how the 1:1:1 model allows salesforce, and other companies to ‘do well, and do good’. Also highlighted was the stories of ‘trailblazers’ such as Stephanie Herrera, most famous for #SalesforceSaturday.

The focus of the product announcements was on customisation, personalisation, deeper AI integration and IoT, with the announcement of myTrailhead, myLightning, myEinsetin, mySalesforce and myIoT. Of these, I particularly liked myTrailhead, Trailhead is a great learning management system, so rolling out to customers, allowing them to create their own internal trails and track metrics etc is a great move. Hopefully this means the end of super boring and clunky internal training systems.

As usual, here were customer demos, this time from T-Mobile, Adidas and 21st Century Fox to highlight these new product announcements. The T-Mobile and 21st Century Fox presentations had the usual level of salesforce polish and smiling people in trailblazer hoodies, however the Adidas one felt a bit odd to me, especially seeing Marc rocking a full adidas tracksuit and trainers! They centered around how salesforce provides a better understanding of customers.

I attended the developer keynote and was excited about some of the announcements, and a bit disappointed in the lack of others. The major focus of the keynote was platform events, a publish/subscribe architecture allowing you to build event driven applications (similar conceptually to things like MQTT), having used similar tech before I was impressed with this and can’t wait to play with it. Improvements to the Lightning Data Service and new standard lightning components were also announced, bringing it closer to making visualforce completely obsolete. There didn’t really seem to be much in the way of enhancements to the Apex language itself (still no case statement…) which was a bit disappointing.

I managed to attend some sessions as well, including Keir’s session on building offline mobile apps with the Salesforce Mobile SDK, Philipe’s on platform events and Chris Eales’ on helping not-for-profit’s succeed. As always the quality of these sessions was very high and it was great to learn new things from others in the community. When the recorded sessions are release, I will do another post about these in more depth.

One of awesome things about Dreamforce is the opportunities to catch up with people in the community that you’ve not seen, and to meet new people that maybe you only know from twitter / online. I thankfully was able to catch up with many people whom I worked with in Australia and had not seen in a few years. I met some great people from the Good Day Sir podcast community, and I met some new people who were fans of SchemaPuker!

As always, the ‘customer success expo’ was full of Salesforce partners and ISVs showing off their products (and giving out some cool swag). Fidget spinners and socks seemed to be all the rage this year. It is always interesting to see what is available for use with Salesforce, and working at a Salesforce partner its good to have a knowledge of what may be out there to provide solutions to customers needs.

Dreamforce is always a huge week, and it never ever feels like you get to do everything you want to do. While some people think that the whole trailblazer/trailhead/character thing is a bit over the top, the underlying message is solid and its good to part of such a supportive community and to be able to attend events like Dreamforce.

As always, a tonne of talks and keynotes are recorded and will be available online, with some already available here, so even if you didn’t make it to Dreamforce this year, you can get some idea of what it was like.

Dreamforce 2017, What an experience! Part 1: Speaking

The dust is still settling from Dreamforce 2017, having only gotten back to the UK yesterday, but I wanted to share my thoughts while they were still fresh in my mind. This will be a two part blog, first about my experience speaking there, and the second about Dreamforce itself.

Update: Video of my talk has been posted on YouTube, check it out here!

Speaking at Dreamforce

As you may be aware, this was my first time speaking at Dreamforce, and my first time speaking at such a huge event. As a fresh graduate of Speaker Academy, I had decided to submit an abstract for Dreamforce (actually, I had not even graduated at that stage, as the call for papers closed before our graduation) I had thought to myself that this would be a good opportunity to practice writing an abstract.

To my great surprise, my talk got waitlisted, meaning that it would be accepted if other accepted talks were not able to go ahead.I was happy I had gotten that far, I figured it meant my abstract was at least half decent. Much to my surprise, a week or so later I was told my talk had been accepted! To be honest I was absolutely terrified, I still hadn’t graduated speaker academy at this stage, so I’d not really done any proper public speaking before and now, all of a sudden I am talking at the largest tech conference in the world!

I started work on my talk immediately, I had the same topic as my graduation speech, so I already had some content, however my graduation speech was a lightning talk (5 minutes max) and my Dreamforce slot was 20 minutes. Graduation rolled around and I gave my lightning talk, I think it had gone fairly well and I got good feedback from my peers and Jodi and Keir.

I was feeling a little bit more confident at this stage, but still quite scared about Dreamforce. I was assigned Philippe Ozil as my session owner from salesforce, and he was amazing, he helped me hone my title/abstract, and my presentation itself, listened to my dry runs and gave helpful feedback. Having a good session owner made the whole process that much easier.

Having a couple of dry runs under my belt (with just myself and with Philippe) I was asked if I wanted to present at the London Salesforce Developer User Group as additional practice. I jumped at this opportunity and was very glad that I did, as I uncovered a bug in my presentation (Lucidchart’s import process had changed) and was able to both talk around it on stage, and had a chance to fix it before Dreamforce. It also gave me a chance to make some slight changes to my presentation and hone it that extra little bit.

The week before Dreamforce I gave a dry run to my partner, which, to be honest was probably the hardest one to give. No one likes to look like an idiot in front of a group of people (which is a big fear I had about talking), but you REALLY don’t want to look like an idiot in front of someone you love! However, I am glad I did it, as a) she had some suggestions that as an outside person, I would never had thought of and b) It wad good practice for dealing with nerves.

Finally the big week came, I hopped on a plane to San Francisco and Dreamforce began! My talk was on the second day of Dreamforce (Tuesday 7th Nov) at 12.30pm, so I had a good chance to get over jet lag and a little bit more time to prepare myself. On Monday, I made sure to explore the Trailhead area at Dreamforce, where my talk was to take place, so that I had an idea of how long it took to get there, the setup, the layout of the stage, etc.

I also had a chance to test my laptop and make sure everything would work as expected on the big day. Another advantage of scoping out the venue first, was I was able to see where related areas were that I could reference in my talk, e.g I was able to refer people to the Heroku area, or the SLDS area if they wanted more information about these things.

Tuesday finally came, and I would be lying if I said I wasn’t nervous. I woke quite early and did yet another dry run in front of the mirror, I also updated my speaker notes in my slides to include the things I had noted the day before. I got to my stage in time to watch the talk before, and by this time the neves had well and truly set in! Funnily enough, the talk before actually included screen dumps of schema builder, something I specifically reference in my own talk. Several of my colleagues from BrightGen and even some guys I used to work with in Australia were already in the audience in anticipation.

The previous talk ended, and it was my turn to take the stage. I got mic’d up and set up my laptop, by the time this was all done I only had four minutes to wait until my talk would begin… these felt like the longest four minutes of my life, nerves were in full force as I waited for the sound guys to indicate my mic was on and it was time to start. I finally get the thumbs up, mic was on and the counter started.

I begin my talk, introduce myself and SchemaPuker, and something quite strange happened, all of the nerves I had before melted away, I was focussed and it almost felt like the audience wasn’t there, I felt like I had found my stride and my talk was flowing well, I finished talking about how SchemaPuker came to be and it was time for the live demo… the nerves were back, even though I had run through it that morning, and again just before I did my talk, I was still worried it would somehow go wrong.

Luckily, it worked flawlessly, and I transitioned into the more technical half of my talk, explaining the tech I used to build and host SchemaPuker. Before I knew it, I was at about the 18 minute mark, and with only one slide to go I was ready to conclude and ask for questions, I had hit the timings I was hoping for and the talk was over.

I was feeling quite pleased with how it had gone, and I had quite a few people come and ask questions afterwards, about the tech, about SchemaPuker itself, and even questions on how I could integrate or take the tool further, which was awesome. My BrightGen colleagues told me that they though it went very well and that I had come across confident and that my pace and articulation were spot on.

So what did I learn from all of this? Well, first of all, speaking at Dreamforce is an amazing experience, and the folks at salesforce want you succeed and provide you with all of the help and support you need, not only that, but you won’t be boo-ed off stage or heckled by the audience, the Salesforce ohana is a supportive place. Secondly, I am incredibly thankful for the hard work Jodi and Keir put in to speaker academy to help prepare me for something like this! Finally, that public speaking is terrifying, but strangely addictive… I definitely want to do more of it, and I plan to submit talks for other conferences and events in the future.

I want to thank Salesforce, for accepting my talk and providing me with this opportunity and also I want to thank BrightGen, for sponsoring my trip and being 1000% supportive of me and my talk, both before Dreamforce, during Dreamforce and afterwards, It’s amazing to work at such a supportive company! Finally, I want to thank everyone that came to my talk, to my dry runs and who asked questions and gave feedback, knowing that people use the things you create, want to listen to you want to say, and want to help you to improve makes it all worthwhile.

So my advice to anyone is; we all have something interesting to share, it could be something we have built, something we have learnt or even our journey and perspective on things, so I would encourage you to get out there and talk about it, even if public speaking isn’t for you, you can always blog, tweet, podcast or contribute to the success community/stack exchange! It’s not as scary as you think.

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”.

Finally…

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!

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<apex:page standardController="Account" standardStylesheets="false" showHeader="false" sidebar="false" renderAs="PDF">
    <html>
        <head>
        </head>
        <body>
 
            <h1>Account Summary for {! Account.Name }</h1>
 
            <table>
                <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>
            </table>
 
            <p><apex:outputText value="{! Account.Description }"/></p>
        </body>
    </html>
 
</apex:page>

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//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();
    generatedPdfs.add(b);
}

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

    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

    sp2

    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.

    sp3

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

    lucid1

    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.

    lucid2

    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.

    lucid3

    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.

    Fun with OAuth2

    OAuth2 is a magical thing, it makes it *very* easy for users to login to your application without sharing their credentials with it. The actual authorisation of the user is handed over to the service they are authenticating against (e.g Facebook, Twitter, Salesforce) and you are given an ‘access token’ which which you can make requests to the service with. For more on OAuth, there is a good explainer here.

    At the moment, I am working on an application that I hope will be useful for some of you. This application needs to authenticate to salesforce in order to use it’s APIs.

    The last time I did salesforce auth, I used the Login/Password/Token method via the SOAP API. This method works, but it’s not ideal for a webapp. It’s fairly clunky, requires my app to handle the actual credentials and usually needs a token. It has huge the potential to be insecure and is a bad user experience.

    So after much looking around, trying, failing, goolging, etc I finally found something brilliant…. The Scribe library. It handles the actual OAuth bits, this allows my login code to be very, very tiny.

    The next piece of the puzzle is what to do with the returned JSON, unfortunately the Scribe library struggles to parse it. In order to access the APIs I am using the Force.com WSC, which uses a ‘ConnectorConfig’ object to pass authentication details when it makes calls. So I needed a way to take the JSON returned from OAuth and return a ‘ConnectorConfig’ object that I can use with the WSC.

    This was actually pretty straightforward, I simply serialize the JSON to an object using the Google GSON library and construct the ‘ConnectorConfig’ from the result.

    Once I have a connector config, I can make API calls with the WSC and build the rest of my application. I hope that if someone is in the same boat as I was last week that this post helps them out.

    Feel free to leave any comments below 🙂

    Salesforce Community Events – Surfforce

    If you’re in the salesforce space, no doubt you have heard of some of their events. The biggest and most well known being Dreamforce. Perhaps you’ve been to a Dreamforce, or world tour or one of the other official salesforce.com events.

    But perhaps something you didn’t know about were salesforce ‘Community Events’. These are events that are not run by salesforce.com themselves, rather, they are organised by the community (often sponsored by salesforce.com partners, ISVs, etc). Community Events are relatively new in the space, but they are picking up pace quickly, an excellent example of this was the London’s Calling event here in the UK (that I unfortunately didn’t make it to.. next year!)

    So why am I talking about community events? Well, I went to my first one recently – Surfforce.

    Surfforce was billed as ‘a salesforce user group with a difference’ and it certainly was. Held in Aberavon, Wales, the basic idea of the event was ‘lets go for a surf in the morning, then talk salesforce in the afternoon’. It was the brainchild of Shaun Holmes, who’s passion for both helping others, the community and salesforce is incredible.

    The event was aimed at people new to the salesforce community, with several excellent speakers sharing their journeys within the salesforce world. As well as this, there was a focus on helping local charaties.

    I only found out about the event about a week before, so lucky enough I was able to organise the trip down with Scott. Given my late coming to the party, I was not able to secure a spot in the surfing portion of the day, which suited me fine, I am from Australia after all and the water temperate in wales was a little different to what I am used to!

    When those brave enough to strap on a wetsuit where finished in the ocean it was time for lunch, networking and chatting with sponsors.

    surfforce-agenda

    After lunch, we were treated to some excellent talks. First was Danielle from the wave project, she took us through what the project was about, and the amazing impact that it has had on the kids in need who were able to take part. They are doing excellent work with kids in need, providing ‘surf therapy’, teaching them how to surf and helping them with mental health issues such as anxiey and depression. Thanks to surfforce, over £500 was raised to help them in their efforts, as well as the opportunity for 15 kids to take part in a surf lesson at the same time as the surfforce attendees.

    We next heard from Anna, a local businesswoman and entrepreneur, who spoke of her humble beginnings in Poland during the cold war, and how she was able to make the most of what she had and how she was able to keep challenging herself to be better and better. She has won multiple awards and is CEO of two successful companies, her talk was definitely inspiring.

    We then heard from Dave and Mike from salesforce, both of them very early employees, they gave a very informative presentation that went through the journey salesforce as a company has been on, from having a handful of customers in 1999, none of whom had to pay for licensing for the first year! (interesting side note, one of these early adopters was a previous employer of mine) to launching the AppExchange, running on a box under dave’s desk, and originally called the App Store (sound familiar?) to the multi billion dollar success they are today. This was a very interesting talk, and if you get a change to see/watch it I would highly recommend it.

    After a brief break for lunch, we heard from several more excellent speakers. The first of whom, Louise spoke of her personal journey from someone who had no experience with salesforce (or computers really, she has a background in Literature) to becoming an Awesome Admin. She spoke of how she found that she had more of an interest in the systems she was working with, than the actual work itself, and how that when she has salesforce ‘forced’ upon her, she decided that she would learn as much as possible and make a go of it. Louise described how much the salesforce community has been a help to her, the sheer volume of resources out there and how inclusive and helpful people were.

    Next up, Antonia took us through her journey to bring her to the position she is in today (Lead Consultant) and how that her journey and the salesforce community is anything but boring. She explained that using the salesforce platform, anyone who wants to try can become a developer thanks to the supportive community, excellent declarative tools and wealth of documentation.

    Finally, Jodi spoke to us about her journey from Salesforce Admin to Consultant, with a presentation entirely of GIFs (no death by powerpoint here!) she spoke of how she was constantly looking for new challenges, from being an Administrator, to setting up a Centre of Excellence, to finally making the move into the consulting world. Her journey in particular is one that I think a lot of people in the salesforce consultancy world will be familiar with (I know I am, I started my salesforce journey as an Admin back in 2008)

    Proceeding ended with drinks and networking. To spite not being the exact target audience, I think that I got quite a lot from attending Surfforce, I met a load of amazing people and got to be involved with, what I think, is an excellent concept.

    Shaun, Kerry, the speakers, volunteers, sponsors and everyone else who worked so hard to get this event up and running deserve a huge pat on the back for what they achieved with this event. I think the Surfforce concept would fit in perfectly back home in Australia. Something like this could be easily done in both the Gold Coast and Sydney, and given the salesforce community in Australia, could be very successful. I hope that someone seriously considers this concept, and that the next event is even bigger and more successful than the last.

    I think the concept of community events is a great one, it goes to show how inclusive the salesforce community is as a whole and how excited people are about the platform. Surfforce may have been my first community event, but it most definitely won’t be my last.

     

     

    Kittenforce! aka. telling your users when your instance is down for maintenance

    The other day, Scott (check out his blog here) and I were at work chatting about the security trailhead superbadge (specifically, my domain). When you have a custom domain for your salesforce instance, you can customise your login page (or replace it entirely).

    I then decided that a would make the login page far better, and hence;

    After this, I went to login to a sandbox to do some actual work, only to be greeted with the ‘Please check your username and password. If you still can’t log in, contact your Salesforce administrator.’ message.

    I was fairly sure I hadn’t forgotten my password, so I tried it again… nope. same thing.

    What I had forgotten, was the fact that the daily deployment to that environment was happening, and as such all users except for the DevOps team were frozen out.

    Which got me thinking… If I can put kittens on the login page, then why not some useful information too.

    So, that evening I built this;

    The concept is fairly simple, when you put an environment into ‘Maintenance’ mode (e.g during a deployment, etc) it freezes all users, excluding a defined list (e.g the DevOps team, system admins) and changes the login page to show a message informing the users of this.

    When you are finished and disable maintenance mode, it will unfreeze all users and change the login page message back.

    It uses a custom object to store a list of users who were frozen before the environment entered maintenance mode to ensure they stay frozen once the environment is changed back to normal mode.

    The actual page itself is hosted from a force.com site, and is configured via a custom setting and custom metadata, which includes allowing them to be override by other pages.

    If you would like to try this in your org, click here for the unmanaged package

    For installation instructions, see this post.

    I would love to hear any feedback you have, feel free to comment below.