New URL Format For Salesforce Lightning
This post taks about the upcoming new URL format for Salesforce Lightning experience ans Salesforce mobile. The new URL format will be available to users in salesforce summer ‘18 release. The new URL format can be test by activating the critical update for new URL format from Critical Update Console (CRUC) setting. Once the new format has enabled in your salesforce org,you can only revert back to the original URL format by logging a case with the salesforce support for disabling it from your Org.
Example of new URLs
Current format: Account Home URL
https://<lightning.domain.com>/one/one.app/#/sObject/Account/home
Current format: Account Record View
https://<lightning.domain.com>/one/one.app#/sObject/<recordID>/view
New format: Account Home URL
https://<lightning.domain.com>/lightning/o/Account/home
New format: Account Record View
https://<lightning.domain.com>/lightning/r/Account/<recordID>/view
Points to keep an eye out for this change:
1. URL Execution
Those Lightning components which are executing an URL using window.location or the aura:locationChange event may not behave properly in the new release.
Appending parameters in URL
If there are parameters appended to the original URL, those Parameters will append differently in the new url.
For example:
The original URL is:
/one/one.app?myparam1=xyz&myparam2=abc
The New URL will be:
/lightning?0.myparam1=xyz&0.myparam2=abc.
2. aura:locationChange Event
The aura:locationChange event automatically gets fired when the hash part of the URL has changed. Since there is no URL hash in the new lightning URL format, this event will not get fired.