Thursday 31 December 2020

2020 Year in Review - Part 1


2020 started quietly, like any other. The first London meetup was Einstein Analytics where the number of people doing dry January meant that there was more than enough booze to for the rest of us. The following day was the London Salesforce Developers, where 60 odd people headed over to PWC's offices to hear about Heroku and the Spring 21 release of Salesforce. London's Calling needed bios and headshots, and tickets were selling like hotcakes. 

There were also reports of a virus in the Wuhan province of China that was highly contagious - this didn't feel like something we had to worry about as (a) it was a long way away and (b) we'd seen this kind of thing before with SARS, swine flu and bird flu in the past. Towards the end of the month there were a few cases in other countries, but easily explained through international travel. On the last day of the month the UK recorded it's first case, along with fellow European countries Sweden and Spain. Again, very much a case of someone bringing it with them on holiday and easily contained.


Two meetups for the Developers in February. First a fireside chat with Wade Wegner at Salesforce Tower on 5th, talking about Evergreen (now Salesforce Functions) and more. Little did we know this would be the last trip to the tower of 2020.  Then on 12th we had our Dreamforce Global Gathering at Deloitte's offices in Clerkenwell Green. Little did we know (2) that this would be the last time we would meet in person. 

Spring 20 went live and I presented a release webinar with my colleague Clive Platt. Little did we know ... you get the picture. This brought the new mobile app to all users, and introduced the WITH SECURITY_ENFORCED SOQL clause and the Security.stripInaccessible() method to bolster security in Apex. What a time to be alive!

The COVID-19 virus was still around  - by Feb 6 there were 30 odd cases in Europe which led me to mention it when sending my London's Calling slide deck - a throwaway remark hoping that it didn't derail us. It still seemed a very low risk, and likely something that would level out quickly - in the UK we only had a couple of cases. Fast forward to the end of the month and we still had under 20 cases Looking over to Europe, the case count in Italy was rapidly increasing. Around this time things started to change as we realised that it was likely to be problematic, although human nature still made us expect that things wouldn't be too bad. At BrightGen we started planning for how we'd shift most/all of our workforce to remote, with a dry run day scheduled for March.


The London Salesforce Developers decided not to hold a meetup in March, as the London's Calling community conference was taking place and that typically consumes most of the community's energy. At BrightGen we'd had our dry run day in early March with everyone working from home and it had been pretty straightforward. Which was handy as we went completely remote the following week, although with offices still open for the odd face to face meeting. 

The Salesforce World Tour London, due the third Thursday in May, was postponed. By the end of the month TrailheaDX had gone virtual and become a half day or so event. 

As everywhere started to shut down, or operate at a much reduced capacity, I had to make a trip to a testing centre in Stratford to take my JavaScript Developer 1 exam. After a weird journey where I shared a whole carriage with about 10 other people in rush hour, I arrived at a deserted Stratford that would usually be bustling. I had an hour to spare in a ghost town where not much was open and there was nowhere for a casual visitor to sit inside with a coffee and carry out some last minute revision. So I wandered the streets while reviewing my notes and did my best to avoid going within 6 feet of anyone else. After the test I headed back home on a carriage with about 8 other people, as the London's Calling speaker drinks scheduled for that evening had been cancelled due to the ever increasing virus.

London's Calling had tried to stay in-person, but eventually gave up the battle and went all remote, with the exception of a few speakers, including myself. This involved another trip to London, this time sharing the carriage with 5 other people and arriving at an eerily quiet Liverpool Street, which typically resembles the zombie apocalypse at that time of the morning. A strange day then commenced of a group of speakers shuffling from one room to another to support each other, moving the chairs into corners of the room and generally avoiding each other while trying to network with each other. I personally had the pleasure of presenting to the cavernous and almost totally empty keynote room - this was actually a great experience as I had to still give my best even in the absence of an audience and in a somewhat uncomfortable environment. Whatever doesn't kill you makes you stronger. I'm not sure the organisers would agree though, having pivoted from an in person to virtual event at a few days notice, and spending a lot of the day finding out the limitations of the various livestream event platforms! 

After a happy hour involving a live band and highly distanced drinks and dancing, I headed home sharing the carriage with 3 other people, wondering how long the trains would continue to run with so few passengers. This was also the last day that the pubs were allowed to open, in an attempt to slow the spread of the virus, and they were packed both inside and out until closing time. It didn't seem like this was going to help much, and it didn't. A mere three days later we were locked down and only allowed out for an hour's exercise a day.

I'd been asked to present at the Finland Developer Group on 25th March. It was always going to be remote, but as I was preparing my talk it started to feel like a vision of my future. Short term future, though, which turned out to be all kinds of wrong!

Related Posts

Saturday 12 December 2020

Org Documentor - Fields Usage in Page Layouts

The November meetup of the London Salesforce Developers saw us sharing our favourite tools, those we use regularly and those we have written ourselves. I showed the Org Documentor, and got a great question from Lawrence Newcombe - does the information output for the custom fields include details of which page layouts they are used on. The answer was no, but definitely doable. And here we are less than a month later and it's done! 

There's no additional configuration required, but as always remember that it only works against the metadata that you have retrieved from your org. If fields or page layouts aren't present on disk, they won't appear in the report.


I've had to tweak the format of the report slightly, as the layout names can be quite long so I needed more real-estate. For those that care about the bootstrap side of things, the main bodies of the pages now use the container-fluid class rather than container, as this allows them to take up most of the width of the page.

The fields table now contains a new column - Page Layouts - which has the layout name and the behaviour.

As the names can be quite long and there can be multiples, the behaviour is in bold and there's a separator between each layout. 

This output was generated from the sample metadata and can be viewed online.


Much like the last enhancement I added, aura enabled classes, I was again pleased by how little code needed adding. I loaded the page layouts from the source folder and iterated the layoutItems entries. For each of these I created an ObjectPageLayoutData record and stored this in an array associated with the object and field combination. I then cached this information in a map, keyed by the object name, followed by a ':', followed by the field name.

When generating the field record, after it has been enriched with any extra information, I then retrieve the cached ObjectPageLayoutData array for the object name and field combination, and add this to the object information that is passed to EJS to generate the HTML.

In the HTML template, I check to see if there are any ObjectPageLayoutData entries, as fields don't have to be present on layouts, and if there are some, I iterate them and output the layout name and the behaviour (Required/Edit/Readonly). As there can be multiple entries, and the names can be quite lengthy, I add a thematic break tag (<hr/>) after all but the last item in the array (and I also think it's pretty cool that in an EJS HTML template I can iterate an array and tell if I am on the last entry!).


Version 3.3 of the plug-in has this new functionality and can be found on NPM

If you already have the plug-in installed, just run sfdx plugins:update to upgrade to 3.3.

if you aren't already using it, check out the dedicated page to read more about how to install and configure it.

The source code for the plug-in can be found in the Github repository.

Related Posts

Saturday 5 December 2020

Salesforce buys Slack

A week after the news broke that Salesforce were looking to acquire Slack, the deal is done - we knew it would be, so that it could be announced at the Dreamforce to You keynote. It turns out that talks started some time ago, but with Slack talking to Salesforce about an acquisition of Quip. This would have been a real surprise, as I can't recall Salesforce ever selling on an acquisition, although they have shut a few down (including my favourite todo list,

In my previous post I touched a little on why Salesforce would need another tool to collaborate outside of the Salesforce instance, and I've been thinking more about this.


Chatter is a great tool for collaboration around Salesforce data, allowing you to combine structured information in the record detail and related records with unstructured data in the chat. You can see the historic discussion around changes to the record, not just which fields changed, and understand more about the lifecycle of a record. Did a case involve pulling in additional teams, did a Sales manager have to chase up a rep to progress an opportunity. All of this is valuable information which is hard to capture on a record without having a million related records.

Chatter groups are also useful in the context of Salesforce data. Being able to @mention a group regarding a record, using the same example from above, if there was a case that required a specialist team you could get their attention with a single post. They are less good at general collaboration in my view - while I use groups a lot, it's for headline type posts - announcements or asking if anyone has seen a specific problem before. But only for the initial contact. Once the protagonists are identified, any further collaboration is typically carried out via Google Chat, Slack, email or videoconference. Essentially I find hem a way to get the attention of the right collection of people. 

I don't think Chatter was helped by the investment drying up after a few bumper years. The desktop application lagged way behind the web interface, and was eventually withdrawn, even though it was pretty popular. But the key sticking point to expanding to the wider company is the org-centric aspect. If you have multiple orgs, then people need to maintain multiple logins, which is a bit easier with mobile app as can easily switch, but still not ideal. You also need to be very clear which is the correct org for collaboration, even if it's around something happening in another org. There were some third party solutions around providing single view of chatter across orgs, but generally these replicated posts across orgs and required additional licenses for the ISV product and often something like Heroku orchestrating the transfers. You also can't integrate inside the feed like you can with a tool like Slack, although you can do a bit more around the feed with Lightning Experience pages. Automatic notifications also felt quite antiquated, as for a long time you had to construct a post through the Connect API, @mention someone, then detail what it was you wanted to alert them about. This has improved since the advent of process builder and custom notifications, but was introducing features that other tools had for years. Once Quip came along, that felt like Chatter was heading down the maintenance only route. 

Employee Communities

Communities were another attempt to introduce collaboration across the enterprise, and replace the intranet, that didn't make it. What most companies wanted were a simple way to create a related set of pages (Google sites anyone?) for intranet type content and a way to collaborate on the content. What they got was a $20/user/month platform-lite style license, that pretty much guaranteed limited take-up. For example, I was working with a 4,000 person company who wanted to migrate their intranet to Salesforce. They had 300 or so existing Salesforce users, so needed around 3,700 community licenses, which would lead to a bill of around $75,000 per month, for an intranet that people would use to find someone's phone number or figure out how to book holiday! Yes they could access up to 10 custom objects, but the vast majority had no interest in that. Without reasonably priced, login-based, entry level licenses, the employee community was always going to be priced out of the market. The employee community license was eventually withdrawn and users transitioned to a platform user license with a company communities for permission set, which feels like what was actually being sold.


Against a dedicated solution like Slack, aimed at the entire company rather than specific groups of users, it was always going to be a difficult battle. Acquiring Slack gives Salesforce access to the entire enterprise, especially if they stick with the free tier. Yes you don't get the history, but important information should not be stored in chatlogs. If people have to search back through the history of chats they may not have been involved in to find something they need, you're doing it wrong.  

Where the chat history is important, as mentioned earlier, is when it is colocated with a record, and this is why I think chatter will live on after the acquisition - people won't switch to another tool to search for any messages related to the record they are currently viewing.

Slack may have lost $147 million last two quarters and may not have seen the growth that other tools have during the pandemic, but they also haven't had the unstoppable force of Salesforce Sales and Marketing pushing it. According to Marc Benioff, 90% of Slack customers are also Salesforce customersOnce the machine is tooled up to sell Slack, I'd expect the numbers to trend towards this in reverse - a massive existing customer base, existing access to the upper echelons of leadership, and a motivated (incentivised) Sales operation will, I believe, lead to a large amount of Salesforce customers becoming Slack customers.

Follow @bob_buzzard