Loading

The startURL parameter is not redirecting to Lightning Platform site

Udgivelsesdato: Oct 13, 2022
Beskrivelse
Scenario-
User created a force.com site, say "http://mysite.force.com/".
This is also used by customer portal users.
If Salesforce user sends a link to a KB article to a customer portal user say "http://mysite.force.com/SiteLogin?startURL=/articles/Training_Video_Series/000002154?popup=true", it redirects to home.jsp or something else after login rather than the KB article explicitly mentioned in the URL.

 
Løsning
1. Need to check the SiteLoginController apex class.
This is standard apex class used in Site.com login.

2. In the login() method, make sure that the startURL parameter is set as follows
String startUrl = System.currentPageReference().getParameters().get('startURL');
return Site.login(username, password, startUrl);

3. If the startURL parameter has been set to something else, then you will not be able to use it in the given scenario. 
Vidensartikelnummer

000386945

 
Indlæser
Salesforce Help | Article