Posts

Showing posts from March, 2018

Detect URL Format (Lightning Experience)

Following the announcement that the URL format in lightning experience will change from /one/one.app we are looking for a way of detecting which format is being used so that we can generate URLs in Apex.

For example, if we were to generate a PDF in Visualforce containing a URL to a lightning page we would like to correct the URL to use the correct format depending on whether the org is using `/one/one.app` or `/lightning`
What does it do? From the announcement:

It changes the URL format used by Lightning Experience standard apps and the Salesforce mobile app. For example:
Current format: https://<lightning.domain.com>/one/one.app/#/sObject/Account/home
New format: https://<lightning.domain.com>/lightning/o/Account/home

In Summer '18 the new URL format will be enforced, but in Spring '18 it can be enabled for testing via a critical update.
Why do we care? If the user enabled the critical update themselves we need to be able to make sure that our features still work.

London's Calling 2018: Getting Started with Salesforce Lightning Components & Lightning Data Service

Image
Many thanks to London's Calling for recording my session on Lightning Components and Lightning Data Service.

The full video is now available on YouTube.