Build your own Lightning Component

Christmas is almost here: 4 days and counting! How about getting into the pre-Christmas spirit by building your very own Lightning Component?

Why are we doing this?

My current projects all involve building solutions which are centred around an application – an application for a consumer mortgage or an application for a business loan – and the common architecture for all our solutions is an application object with a number of related custom objects to support the unique processes of the end customer.

During the application journey, we collect different artefacts of information – examples: photo identification documents or 3 months bank statements for proving incoming, or anything else which is required to support the application –  you get the picture?

How are we doing this?

By marrying up screen-based flows with Lighting Components, which is a super powerful combination and one which really speeds up the development time. Sold on that? It’s similar to composing Lightning pages but instead, flow handles the transition from one page to the next. If you have built flows you would have seen the option to use Lightning Components and may have noticed a growing list of available components which can be used for things like validating email address and web URLs and there is actually a file upload component too which nearly meets our requirements. Notice I said ‘nearly’ and this nicely opens up what we think is a good learning opportunity to get your feet wet.

What do we need it to do?

We need to see the uploaded files which we have uploaded clearly plus the ability to change our mind or, better said, delete files if we have uploaded the wrong file by accident – all within the same Lightning component – that’s it!

So sit back, grab a mince pie and some warm mulled wine; then get ready to build your own component.

Here are the links to the resources we mention and use:

How to: Configuring Lightning Components for use with Flow

Lightning Component – Lightning File Upload

A file uploader for uploading and attaching files to records.

Lightning Component – Lightning Pill

A pill displays a label that can contain links and can be removed from view.

How to: Calling a server-side action (Apex Controller)

And finally the Slide deck

Merry Christmas from the Salesforce Weekly Team!

Leave a Reply

%d bloggers like this: