I am trying out to figure out if I missing some configuration or if there is a workaround for this requirement to make it work as expected.
I have an email triggered from my apex controller which uses VF email template. In the email template I have the dynamic lightning URL for the record view. The logic works fine, but the issue is the URL in the email onclick redirects to login page -->on login it lands on Home page rather than redirecting to the record view. If the user is already logged in and I click the URL from email it works as expected i.e navigates to the record view.
Here is the URL format I have in my VF email template:
https://lightning.domain.com/one/one.app#/sObject/{!relatedTo.id}
Any thoughts or ideas would be greatly appreciated.
Thanks!