Salesforce Summer’ 18 Release – 5 updates for Lightning Components

Lightning Component is a new framework designed to create dynamic web applications, both for mobile and stationary devices. As with the previous edition, the Summer’ 18 Release introduces new possibilities, available from now for Lightning Components. It’s worth getting to know them to work even more effectively with Salesforce!

Here are five functionalities that we selected:

 

1. New base components to faster build a user interface

 

Summer Release introduces a few new components, especially useful in building UI. The components require API in versions 43.0 or above.

  • lightning:insertImageButton: – opens the files’ native browser, allowing a choice and the insertion of images in the text field.

 

Lightning Components

 

  • lightning:quickActionApi: – provides access to the methods responsible for interacting with Quick Actions directly on the Lightning Page. It is used to call the JavaScript API for Lightning Quick Action.

 

  • ligtning:navigationItemApi: – guarantees access to methods controlling navigational elements in Lightning applications:

 

– focusNavigationItem()
– getNavigationItems()
– getSelectedNavigationItem()
– refreshNavigationItem()

 

  • lightning:recordForm: – eases the creation of formulas. Mode selection allows for the editing/viewing/adding records, and all this is much easier than using lightning: recordEditForm or lightning: recordViewForm

 

Lightning Experience

 

  • lightning:navigation: –  creates a URL for the given pageReference, describing the type, attributes and state of the page. 

 

2. The public Lightning Components library

 

If you’re tired of changing between Developer Guide and the components library, we have good news! From now on, all documentation regarding components, interfaces and events can be found in one place. All you have to do is enter: https://<myDomain>.lightning.force.com/componentReference/suite.app  and find the required information.

 

3. Starting up debug mode for selected users

 

Debugging mode significantly lowers website loading time, which until now, made debugging on production instances quite problematic. From now on, it’s possible to run the debugger for selected users so that it won’t affect the performance of Salesforce for the rest of the organization.

 

Lightning Components

 

4. Returning Blob objects no longer causes (too many) general errors

 

Until now, each return of Blob objects caused a difficulty to debug, or general error. Now, this type returns a string value – Blob(sizeOfBlobInBytes). In order to get the proper content of “Blob”, the value should be returned in the form of a serialized JSON, e.g. in the form of a string or integer. On the client’s’ side, it is possible to adjust the value obtained to any data structure using JavaScript. The Blob is obtained from the controller from the servers in the case of:

  • returning of a Blob, e.g.: ContentNote,
  • returning the results of an SOQL request that references to a Blob field,
  • returning of an Apex-class object containing a Blob field.

 

In each of these cases, returning the value will be string type and define the size of the object.

 

5. Lightning Navigation API for Lightning Components

 

Thanks to the lightning:isUrlAdressable interface, there is a possibility to control what Lightning Components can open. From now, we can also capture URL parameters in a simple way, using the v.PageReference attribute, and use their values in the contents of a component. While using lightning:navigation, it is also possible to define the PageReference object leading to the custom component implementing lightning:isUrlAddressable – and set its attributes!

 

The new functionality considerably accelerates work with Lightning Components, simplifying complicated procedures. More information regarding changes in Salesforce Summer’ 18 Release can be found in the official Release Notes.