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

Monday, 14 September 2015

Lightning Experience Trailblazing!!!

In a special global broadcast, Salesforce recently launched the 'The new Salesforce'. This new Salesforce came in the form of the 'Lightning Experience', a new, responsive, crisp UI, that takes your existing Salesforce data and presents it in a much more modern graphical manner. It's responsive, and aims at providing a unified experience and appearance across all your devices, from watch to phone to tablet to desktop. Check out the introduction and demo video from the Salesforce website.

This announcement was great, it left users looking forward to getting started with the new interface. However, as a developer during this initial presentation I had a lot of questions; What does this mean for all the Visualforce I've written? How do I make my pages look like they belong in Lightning? Do I need to build two versions of everything (Lightning Exp. and Classic) in order for stuff to work for everyone? Are there any kind of code techniques and tweaks I use at the moment that won't work anymore?

Fortunately though, answers weren't far behind, as Salesforce Developers released several new Trailhead learning tracks that address these questions, respond to common concerns and let you get hands on with building some Lightning Components for the new UI. For those have never used Trailhead before, it's an amazing learning tool that provides Salesforce users from all walks of life (CRM User, Admin, Developer) with exercises, both written and practical, for learning more about how to make the most out of Salesforce. There are four new trails (with shiny badges) to get your teeth stuck into:


The two admin trails guide you through the process and best practice of moving your existing Salesforce Classic organisation over to Lightning Experience, and explore how to use the basic features of the new UI once you have made the switch. The Sales Rep trail takes you through the experience from an end user perspective, showing how to use the new features to make better sales. The developer trail includes elements of the admin trails, but also explores how to manage your existing custom coded functionality and build new apps effectively in the new UI.

Although all four are definitely worth doing no matter what your role is, as a developer the one trail your should definitely tackle, unsurprisingly, is the Lightning developer track. Taking a closer look, the track consists of 5 different modules, each of which provide a different view of the Lightning Experience and answer different questions you may have.

Name Content Questions it answers


Lightning Experience Basics
An Overview of the new UI, and what it means to both new and existing Salesforce organisations. Includes tips on how to conduct a gap analysis when considering making the switch to the Lightning Experience, before turning it on.
  • What is Lightning Experience?
  • How do I know if my organisation is ready to make the switch?
  • How do I turn it on?


Lightning Experience Development
Looks at how your existing use of Visualforce will be affected when using the Lightning Experience. Explains what elements will continue to work, those that do not (for now) and what elements will need reviewing.
  • Will my existing Visualforce pages still work in Lightning Experience?
  • Are there any existing paradigms and features no longer supported if I make the switch?
  • How does this affect my products as an ISV?


Visualforce & Lightning Experience
This unit goes into further detail about the relationship between Visualforce content and the Lightning Experience container it will be presented in. It also contains recommendations for styling and methods of identifying if a user is accessing the Page through each of the different UIs.
  • How will Visualforce content be presented in Lightning from a technical perspective?
  • How can I prepare a Visualforce Page for use in both Salesforce Classic and Lightning Experience simultaneously?
  • Will my Page actions and Visualforce navigational methods still work?


Lightning Components
An introduction to the development of reusable Lightning Components. This is not a new unit, but with the introduction of the Experience, has been given extra importance and greater context.
  • How do I build and style a basic Lightning Component?
  • How do I pass attributes between different Components?
  • How do I get Lightning Components to run Apex Code?


Lightning Design System
Introduced alongside the Lightning Experience, the Lightning Design System is a tool that aids in the design of Pages to make them look and feel right at home inside the new UI. This unit explores how to use the tool and how to take your app design to the next level.
  • What is the Lightning Design System and why should I use it?
  • How do get my existing apps and pages to look and behave like the rest of the Lightning Experience?
  • How can I include some cool Lightning design elements such as icons and avatars easily into my Pages?

As you can see, the trail covers a lot of ground; it includes 30 individual units, and takes around 10 hours in total to complete, so prepare to lose a few evenings or a weekend, but trust me, it's totally worth it!

From a personal point of view, what I really like about the Lightning Experience developer trail is the practical and honest way it presents the new Lightning Experience, and really gets down to the point in terms of what developers need to know. It's not a sales pitch, shouting "Lightning Experience is here, there is no effort in transition from Salesforc Classic and it makes all your existing stuff magically more amazing!". It is a frank explanation of what will definitely work, what won't, changes you will have to potentially make to existing Visualforce Pages and how to effectively develop a transition strategy between Classic and Lightning.

I also think the inclusion of the unit based around the new Design System is a great idea. In the past, I have always found it challenging to get started with designing content for mobile and Salesforce1, simply because the appearance of anything I developed didn't seem to fit 100% correctly into the look and feel of the app as a whole. The Design system gives you that boost to start developing crisp looking custom content for both mobile and content with the new UI without the hassle and instability of large quantities of highly customised CSS.

From the trail content, it makes it really obvious that Salesforce have spent a lot of time working out the best way to introduce the Lightning Experience to existing developers. It addresses a lot of the concerns developers have, and covers both the management and adaptation of what you already have, whilst also illustrating the best way to build new apps as part of the new exciting UI.

One of the only slight frustrations of the trail is that is it largely tested through questions and answers rather than practical assignments. Those are always the trails that I enjoy the most. But this is only a short term gripe, as I have no doubt more practical exercises will emerge after the feature is GA.

In summary it's a great way to introduce yourself to the new look Salesforce before it storms into orgs as part of Winter '16. So, if you haven't already, get to Trailhead and get Trailblazing! Don't forget to show off those badges!

Thursday, 12 March 2015

Bristol DUG Report - Lightning Developer Week!

On 11th March, the latest installment of the Bristol Salesforce Developer User Group was held at Desynit HQ in Bristol. The meetup formed part of Lightning Developer Week, 9th - 15th March, a series of worldwide events offering developers to opportunity to get hands on with Salesforce1 Lightning.

Lightning is a component framework and set of tools specifically designed to rapidally speed up the app development process for developers, admins and analysts. After a brief introduction, Force.com MVP and DUG co-organsier Simon Goodyear provided a great overview presentation of the different key aspects of Lightning, and the business problems they solve.


Following on from Simons presentation, I jumped in to provide a live demo of each of the core features and how they can be used in conjunction to make powerful app functionality quickly. This was followed up by a slightly deeper exploration of Lightning component code structure (we devs do love a bit of code after all).


After the tour, developers were then given the opportunity to get hands on with some tutorials. If you are interested in getting hands on yourself, here are the links for the different exercises:

 
A really great meetup, plenty of good questions, successful tutorial completions, swag, and ideas about the future of SF development. I'm looking forward to the next meetup already! Make sure to join our meetup group for announcements of future meetings.

PS. I just hit the 100,000 pageviews mark! Thanks to all who have viewed my blog, here's to the next 100,000!