Sunday, 13 March 2016

Navigating the Salesforce Advantage with Trailhead!


I am one of the very fortunate people in life who absolutely loves their job. Friends and family sometimes ask me "What is this Salesforce thing your always talking about? Whats that cloud that is on all your clothes? What does Salesforce do?" Usually, thats the point I shout "What can't it do!" and start rambling about the awesome community, free training resources (Trailhead!!), cloud technology, conferences, and all the cool development stuff you can do. Sometimes in all my enthusiasm I forget the basics of what makes Salesforce as a technology so effective and such a fantastic tool for any business. Very often as developers, admins and users of Salesforce its easy to forget the fundamental principles and technology the company and its success was built on.

Well the amazing people over at Salesforce have introduced a brand new Trailhead trail that covers the fundamental benefits of using Salesforce and the founding principles the company is based on. The trail is primarily aimed at those relatively new to Salesforce, but it definitely doesn't hurt as a refresher for everyone else! The Trail has a very nautical theme, hence the following ridiculous picture:


The trail is made up of 4 individual modules (which yes means 4 new badges for all you fellow badge addicts!):

Name Overview


Salesforce Success Model
Provides a view of who Salesforce are as a company, including the simple ideas the company was built on, and the four tiered vision of everything the company stands for today. Explains how Salesforce leads innovation and ensures to always give back to the community.


Salesforce Cloud Benefits
The first thing anyone new to Salesforce will notice is the cloud logo. Well its not just a logo, its also the technology delivery model that the whole company was built upon. This module explores the benefits of the cloud multi-tenancy approach, and demonstrates the success it has brought to customers.


Salesforce Technology Basics
Security, efficiency, speed of change, innovation; all important factors in the success of enterprise applications. This module covers how Salesforce addresses these factors. It also provides an excellent explanation of the metadata architecture that makes Salesforce so dynamic as a platform.


Salesforce Ecosystem
Salesforce is more than just a technology, its a whole amazing community of users, admins, developers and entrepreneurs. This module lifts the lid on the 1.9 million + members, including the amazing user groups, super active MVPs, and Dreamforce: the annual Salesforce super conference!

So the next time I get asked "What exactly is Salesforce?" I will be able to explain it clearly and simply, and then hit them with the overloaded levels of enthusiasm, definitely an advantage!

Adding a series of modules like this is really to me a sign of where Trailhead is heading. What started out as a means to train developers and admins on how to create apps on the platform, is now spreading into other areas, such as company philosophy, effective management, and diversity. There is even a module featuring the features of the latest Salesforce release, Spring '16 (could this be the start of the end for video release training?). It's in this manner that Trailhead itself is starting to become not dissimilar from its original subject matter; an effective diverse platform that allows for different stories to be told through a solid, dynamic base technology.

Speaking of Trailhead, this month I am completing a module every day! I've found it a great way to catch up on all the content I've missed out on. Follow me on twitter as I #MarchTheTrail

Thursday, 18 February 2016

Bristol DUG Report - Spring '16 Preparation Quiz (With TEST SLAYER!)

On Wednesday 10th February, the Bristol Developer User Group met at the Desynit offices. In the city you could go outside at 5pm without it being pitch black, and no more ice patches were waiting to greet you outside your door, which meant only one thing, spring was just around the corner. How appropriate then, that this edition of the DUG covered the Spring '16 release, focusing on some of the new cool features coming to all Salesforce orgs.

Local Salesforce MVP Simon Lawrence kicked things off with a presentation on some of the new cool Apex code features arriving in Spring '16. The presentation included the awesome ability to set the created dates on test methods (my favourite portion of the release), and also create test suites of re-runnable tests. The presentation also mentioned how developers also now have the ability to stop test runs that already have failing tests registered, making the rerun cycle cover much less time. This ability to halt tests doesn't have an official name, so Simon created the name TEST SLAYER, which I really hope Salesforce adopt!




Simon also covered some additional enhancements, including global picklists and API enhancements. An important concept with the Spring '16 is that from this release forward, all results returned from SOQL queries will be formatted in the locale of the executing user. This could be very significant for multi-national orgs who have to present information to users in different formats, not only from a functionality standpoint, but also from a testing perspective. So be aware that you may have to make some changes!


Here are Simon's presentation slides:


After the presentation, it was time to check if the attendees were ready for the release exam, with a quick fire 10 question quiz. The quiz focused on the features contained in the slides.

While Simon busily marked all the attendees scores, I provided a presentation with live demos of some of the great new features coming to Lightning Experience as part of Spring '16. A new feature that will interest developers is the introduction of new user level global variables for the intended and actual theme displayed to users. Prior to this release, the process of distinguishing which UI theme (LEX, Classic or other) users were viewing content with through code was a tricky business involving interrogating the existence of the sforce.one javascript global. Now with the new UITheme and UIThemeDisplayed variables, available through both the $User global variable and the Userinfo Apex class, this process has been made much more simple and reliable.



Here are my presentation slides:


As soon as my presentation and accompanying demos were completed, Simon read out the answers to the quiz questions and announced the winner. Congratulations to Käbi from Desynit, who scooped the top prize of a Starbucks voucher. The award was presented by Salesforce MVP Simon Goodyear, fresh and buzzing from co-running the massive Londons Calling SF community event!


Thanks to all those who attended, great to see you all, we hope to see you again next month. If you are an existing or aspiring Salesforce developer, why not come along to our next meetup, details here: http://www.meetup.com/Bristol-Salesforce-Platform-Developer-User-Group/events/227339685/

For those who fancy testing their knowledge for the Spring release before the release are available exams, here are the questions and answers from the quiz (no cheating using the slides haha):

Questions:
1. The last/end date of the Spring '16 production roll out?

2. When using a global picklist on a custom field, can you use Profile settings to exclude some values from displaying to certain users?

3. How many test classes can you include in a test suite?

4. For two points: What is the exact, and correct syntax to set the created date of a contact, called “c” to the second of July 1984, in a United Kingdom locale org?

5. What would you enter to make a test exit as soon as the first test fails?

6. Can you delete a Global Picklist definition once it’s created?

7. What API number is Spring’16?

8. Can you set the CreatedDate on a record to be “in the future”?

9. What setup menu item is “Picklists” under?

10. Bonus Question (used as a tie breaker) : How many points does the original “provide universal picklists” ideas exchange post have?

Answers:
1) Sat. Feb 13th 2016
2) No
3) 200
4) Test.setCreatedDate(c.Id, DateTime.newInstance(1984,07,02));
5) 0
6) Yes
7) 36
8) Yes
9) Create
10) 44340

Monday, 11 January 2016

Bristol DUG Report: January Trailhead Smash!

The Bristol Salesforce Developer User Group had its first meetup of 2016 on Thursday 7th January at the BE offices building in central Bristol. In this meetup, we took part in a "Trailhead Smash". The premise was simple, log into Trailhead, the Salesforce learning platform, and complete as many badges and gather as many points as possible as a group within 2 hours. 


The points started flying in think and fast, with the newest trails proving the most popular (If battle stations were built this quickly in Star Wars, the films would have been over in 5 minutes!!). For some developers, it was the chance to try out something completely new, while for others it was the opportunity to go back and complete some of the existing modules and earn those precious badges.

A few hours, drinks and pizza slices later, our members had managed to rack up a fantastic 8 new badges, scoring over 11,000 points on challenges. A superb effort in such a short amount of time. After a brief wrap up and prize giving for most points achieved, everyone left full of enthusiasm and Trailhead badge fever. I must admit, as soon as I got home, straight away I fired up my laptop and finished the module I had started during the DUG. Hooked!!

I'm a massive fan of Trailhead and really enjoy going through the modules, particularly the practical exercises. However, I had never tried using it in a group context. Throughout the meetup I found it really fascinating to see the different approaches that developers had to completing the challenges. This became especially visible during the advanced formulas module, I saw functions used in ways I never thought possible!

Make sure to check out Trailhead if you haven't already. Also, take a look at my previous blog post for a deeper exploration of some of the more recent badges, particularly focusing on the Apex integration module, one of my favourites, a must for aspiring and expert developers alike.

Finally, while on the subject of User Groups, if you are UK based (or fancy a well worth it trip from elsewhere), then check out the LONDON'S CALLING full day event on 5th February in London. It's a unique Salesforce event, completely organised by the Salesforce community for the Salesforce community. It will be a day full of great content; Erica Kuhl and Peter Coffee are the Keynote speakers at the event, alongside experts from throughout the community ready to share their real life experiences and tips. Not to be missed (unless you booked a stag do in Bulgaria on the same date D'OH!).

If you use twitter, you can follow the event through @LDNsCall

See you at our next meetup, details on the Bristol Salesforce Developers group page

Thanks to everyone who came along, Happy Trailing!!! 

PS. Photography and pizza ordering credit to Simon Lawrence, thanks! :D

Thursday, 31 December 2015

The Force.com is Strong with NEW TRAILHEAD BADGES!!!



As 2015 draws to a close, it seems to have flown by in a lightning flash. This has been another fantastic year for Salesforce, with the release of an entire new UI, bigger APIs, better analytics and even greater platform functionality.

For me, Trailhead has been massive this year. The Salesforce development learning platform gets stronger every month, has a massive following, and has really captured the spirit of the developer community, It truly is an amazing educational resource for Salesforce developers, administrators and users of all ability levels.

As a special holiday bonus, Salesforce has rounded off the year in style with the introduction of 6 new badges to get stuck into. Here's a summary of the badges and what they have to offer:

Name Overview


Advanced Formulas
Are you looking to take your formula ninja skills to the next level? This module looks at some more complex practical formulas, including a range of the pre-built functions you have always seen in passing, but weren't sure how to use! 


Apex Integration Services
Need Salesforce to connect to your external systems and communicate with external REST and SOAP data sources? No problem, Apex integration classes to the rescue! Essential for developers, includes great example test methods and mock classes.


Lightning Chatter Basics
A whirlwind tour of how Chatter works in the new Lightning Experience UI. A good introductory badge for those new to chatter, or trying out LEX for the first time.


Lightning Data Management
Load data into Salesforce, Load data out of Salesforce. Simple but effective module.


Application Lifecycle Management
Questions about version control? Can't decide between change sets and the Force.com Migration tool? Confused about the concept of a sandbox that doesn't involve a bucket and spade? This is the module for you!


Build a Battle Station Project
Awaken your Salesforce abilities with this cool app project that enables you to build a whole planning project with NO CODING REQUIRED. Now anyone can be a Salesforce Jedi master! 


For the developers out there, although there is definite benefit to doing all of the badges, the most relevant of the new content is the Apex Integration Services badge. The badge is made up of 4 different units, 1 set of questions and 3 practical exercises (I like that ratio!) :

Apex Integration Overview: This short introductory unit provides some information on connecting to external services. Also includes information on adding remote sites before making calls to external REST and SOAP services, a classic gotcha when starting with integrations.


Apex REST Callouts: The first practical exercise focuses on connecting to external data using REST callouts, explaining the difference between the varieties of call (GET, POST, DELETE etc.). The challenge involves creating an Apex Class that retrieves data on an animal through a callout to a REST service, and then creating your own test methods and accompanying mock class. You cannot pass the challenge until you have run all tests and have 100% coverage on the apex callout class.

Tip: The practical exercise for this unit includes creating a custom mock class to provide a sample response for the callout when made from a test.  However, this is not the only way to accomplish this, make sure you try out using the StaticResourceCalloutMock class as mentioned in the unit body. This is a really cool feature, allowing you to use a static resource as the example response to a callout!


Apex SOAP Callouts: This unit switches focus to retrieving data using an Apex to connect to an external SOAP based web service with accompanying WSDL service definition file. This is an important module, as although in modern development there is much more of a lean towards REST based HTTP callouts to transfer data between systems, there are still a lot of enterprise level systems that only allow access through WSDL based SOAP web service calls.

Tip: Make sure you follow the initial exercise instructions carefully. I got myself in quite a horrible renaming mess when I just skipped through the generate Apex Classes fromWSDL menu, as I didn't ensure that the name of the class was "ParkService" leaving it as the default "parksServices".


Apex Web Services: The previous two units dealt with interacting with services published from other systems. In this unit the roles are reversed, as Salesforce becomes the source of the data. The unit content and accompanying practical challenge is all about defining a class and annotated methods that allows data interaction to be made possible through REST calls to Salesforce. Completing this method once again reminded me how ridiculously easy it is to create REST interfaces for accessing your data.

Tip 1: The practical challenge can be quite a lot to get your head around at first, but its actually quite simple when it comes to the implementation. Think subquery to get all the Accounts with their related Contacts in one SOQL request, and getting the id of the Account from the url is just a case of using some funky substring methods (I used the substringBeforeLast and SubstringAfterLast, never used them before, great!).

Tip 2: In the practical challenge you simply have to create a get request. Make sure to try creating other methods with other supported annotations, such as a @HttpPut or @HttpDelete.


The Apex Integration Services badge is definitely one of my favourite modules so far. When I started Salesforce Development (around 6 years ago) one of the first development tasks I had to do was integrate Salesforce with an external system using WSDL based SOAP callouts. I found it really difficult and the amount of practical content out there for help was minimal. I wish I had great resources like this back then, that allow you to get hands on with great examples.

One of the most impressive elements of the module is the presence of test classes and methods in each of the exercises. In some of the previous Apex modules, while the core functionality was demonstrated in great fashion, there was little mention of testing. While this is ok in training exercises, as soon as you start coding in real world practical applications, you soon realise the importance of writing test methods, and especially writing good test methods. Any good force.com developer knows that you should be spending a considerable portion of your coding time writing test methods, so why should be training be any different?

I thought it was a great idea to prevent developers from passing challenges until they add test methods that cover all of the class code 100%. By writing the modules in this way, Salesforce is encouraging more test centric development, which in my opinion is fantastic!!

Another great positive is the presence of dedicated web services specifically initialised for the module. It may sound like a minor point, but it makes a big difference having a reliable service to test your code against. I've seen plenty of web service training examples in the past where the source service no longer works or has been replaced, which is incredibly frustrating.

So if you want to learn more about coding integrations on the Salesforce platform, or earn any of the other cool badges, then get yourself down to the trailhead site now!

Here's to a great 2016, a year hopefully filled with just as much great Trailhead content, and badges galore! If your located in the South West of the UK, why not come to our January Trailhead Smash and get on the badge trail early!

HAPPY NEW YEAR EVERYONE!!!

Saturday, 5 December 2015

Bristol DUG Report: Salesforce Christmas Pub Quiz!

On Thursday 3rd December, the Bristol Salesforce Developer User Group met together in the Stag & Hounds Pub. After a year of intense lightning quick app development and trail badge collecting, the last DUG of the year was a special reward, a Force.com themed Christmas pub team quiz.

The quiz consisted of 5 rounds. The first 3 rounds included questions relating to general Force.com development and platform enhancements of 2015, starting easy and getting gradually more testing! The fourth round was a music round, where developers had to identify the artist and title of 5 songs, then for a bonus point, identify the Salesforce related connection between them all.

The final round was titled "Trailhead 2 head". Each team was allocated a device and a developer account logged into trailhead, and given the challenge of earning the Lightning Experience Basics trail badge in the fastest time possible. All teams finished the trial within 5 minutes, a superb effort by all.

BUT WAIT, THERES MORE! After the main quiz was over, all contestants were invited to answer quick fire questions in a special LIGHTNING ROUND! All developers took the hot seat in turn and had 60 seconds to answer as many questions on Force.com development as possible!


Congratulations to the team of Alex Tennant and Fabrice Cathala for the top scores on the night, but there were other winners too!


Even bigger congratulations to Simon and his amazing IoT Christmas Jumper, complete with flashing lights and bluetooth speaker!


Below are the questions from the quiz, feel free to test out your own knowledge, or use them in your own groups!

Happy Holidays to (Salesforce) 1 and all !!!

QUIZ QUESTIONS:
Round 1 (easy)


1: What is the full name (2 words) of the new user interface introduced by salesforce this year?
A: Lightning Experience


2: What is the new name for the previous salesforce interface, which used to be known as aloha?
A: Salesforce Classic


3: 2015 has arguably been the year of trailhead. What is the name of the trailhead adopted mascot, (wears a raccoon outfit)?
A: astro


4: what's the api number of winter '16?
A: 35.0


5: In the previous Salesforce setup menu, does the custom settings option appear under "create or develop"?
A: Develop


Round 2 (medium)


6: True or false, you can add Lightning Components to Visualforce pages?
A: true


7: Text, Number and Date are examples of output types from formula fields, name 3 of the other 4 (bonus point for all four).
A: Date/Time, Percentage, Currency, Checkbox


8: This year, the available developer certifications have been overhauled. Force.com developer and force.com advanced developer have been replaced. Name any of the new developer certifications, or the name of the new certification for individuals who want to demonstrate their skills of implementing custom applications using the declarative customisation capabilities.
A: Salesforce platform app builder, Salesforce platform developer 1, platform developer 2


9: what does SOSL stand for?
A: Salesforce object search language


10: with regards to the order of execution, which of the following occurs first; execution of criteria based sharing, executing escalation rules, or sending emails.
A: executing escalation rules


Round 3 (hard)
11: solve the following anagram to find a Salesforce feature: “HENS GULPING BRISTOL CIDER”
A: Lightning Process Builder


12: When creating test methods for classes that make external web service calls, what interface should you use to imitate responses from the external call.
A: WebServiceMock


13: what annotation can you add to a method in a test class to create test records accessible to all other test methods in that test class
A: @testsetup


14: true or false, you can add bucketed fields to joined reports
A: false, this is not possible.


15: AVG (stands for average) is an aggregate function supported by SOQL. Name 4 of the other 5.
A: 4 from Count(), count(fieldname), count_distinct, min, max, sum


Music round


Listen to the following music tracks - name the artist and the full song title for 1 point


16: Huey Lewis and the News - Power of Love
17: Will.I.AM (ft britney spears) - scream and shout
18: Stevie Wonder - Superstition
19: MC Hammer - 2 legit 2 quit
20: The Beach Boys - Good Vibrations


21: how are all the songs connected? The artists have all appeared in Dreamforce keynotes


Trailhead 2 head - I need to prepare 3 existing dev orgs with trailhead logins, then identify a badge that could be won. Teams will then nominate someone to go head to head with other developers.


Finish the badge within 5 mins - 2 pts
Finish with No mistakes - 2pts
Finish first - 1 pt


Lightning round questions (Asked in random order):


Q: What does DML stand for?
A: data manipulation language


Q: How do you control page layout allocation, roles or profiles?
A: Profiles


Q: What does SOQL stand for?
A: Salesforce object query language


Q: True or false, You can use a * character in SOSL queries to select all fields?
A: False


Q: True or false, trailhead is aimed at developers, and only contains trails for developers?
A: False


Q: Name the annotation that can be used to make private variables and methods readable from test methods?
A: @TestVisible


Q: What is the default single batch size used by the bulk api for manipulating records
A: 200


Q: What is the maximum number of master detail relationships a custom object can have?
A: 2

Q: What is the name of the dashboard report type that displays data in a circular chart with a hollow middle section
A: Donut chart


Q: What is the maximum number of calls to the sendEmail method that you can make during a single code execution?
A: 10


Q: What is the maximum number of DML calls that can be made during a single execution of code?
A: 150


Q: What is the maximum number of SOSL queries that can be made during a single execution of code?
A: 20


Q: Name the method annotation you should use if you want that method to execute asynchronously.
A: @future


Q: What executes first in the order of execution, triggers or workflow?
A: Triggers


Q: If an organization's customers are individuals rather than businesses, they can opt to merge contacts and accounts into a single object. What is the name of that object?
A: Person accounts


Q: The four base types of report are tabular, summary, joined and what?
A: Matrix


Q: In the Salesforce community, What does mvp stand for?
A: Most valued professional


Q: If all users in an organisation should be able to view and modify all records for a particular object, what should the organization wide default sharing settings be for that object?
A: Public Read / Write.


Q: If all users in an organisation should be able to view all records for a particular object, but only some users should be able to edit the records, what should the organization wide default sharing settings be for that object?
A: Public Read


Q: What can be allocated to users to provide them with extra permissions and features that they do not have as part of their profile?
A: Permission sets


Q:What attribute, available for the majority of Visualforce components, controls if the component markup is generated on the page?
A: Rendered


Q: What 4 letter word are core visualforce tags prefixed with?
A: Apex


Q: What 4 letter word are core lightning component tags prefixed with?
A: Aura


Q: True or False, you can create roll up summary fields on both lookup and master detail relationships?
A: False, it is just master detail.


Q: What is the maximum number of lookup filters that can be active on an object at any one time?
A: 5


Q: What name is commonly given to a custom object that links together two other objects through a many-to-many relationship?
A: Junction Object


Q: In a Developer edition of Salesforce, what is the maximum number of custom fields you can define per object?
A: 500


Q: What is the maximum length of a standard text field?
A: 255


Q: What is the maximum number of relationship fields you can have on a custom object?
A: 40


Q: According to Salesforce Governor limits, what is the total number of records you can retrieve using SOQL in a single execution of code.
A: 50,000


Q: What is the maximum number of roll up summaries that an object can have?
A: 25


Q: What attribute of an <apex:page> tag is most commonly used to render the contents of a page in a PDF Format
A: RenderAs


Q: What standard Apex method can be called to transform a lead into account, contact and optionally, an opportunity.
A: ConvertLead()


Q: Name the trigger context variable, only available in insert and update triggers, which contains a list of all of the new records.
A: new


Q: What is the maximum number of characters that can be in an Apex Class
A: 1 million


Q: What website can users access to check the current status of Salesforce servers?
A: trust.salesforce.com


Q: What annotation can be used to mark a method as a test method?
A: @isTest (also accept test method).


Q: There are two types of custom settings, one is list, what is the other?
A: Hierarchy


Q: Which city hosted Dreamforce 2015?
A: San Francisco
Q: Which band headlined the Dreamforce gala this year?
A: Foo Fighters