• Zach Delong
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I sent this in to SalesForce support as well but figured I'd ask here after they were unable to resolve the situation quickly.  I am convinced that the solution to this problem must be something simple but it is buried in SalesForce documentation somewhere and I'm too inexperienced with SF to know where to look.  

I'm trying to modify an existing login routine to redirect a user to a resource automatically.  Said another way, if a user bookmarks a particular resource on my site, I want to be able to redirect them to log in, then after succesfully logging in, I want them to be redirected back to the resource they were originally trying to access.  

Here is the code I am working with currently (extremely simple) and a screenshot of a log of the code running.  The relevant parts are highlighted.  
https://www.evernote.com/l/ANz7-J53DQpPP4jUQw_YikXkwM8HmnGBLB0

Here is the relevant documentation that guided me to this solution

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_sites.htm#apex_System_Site_login
https://help.salesforce.com/apex/HTViewHelpDoc?id=sso_provider_addl_params_start.htm&language=en_US

I'm missing something, because the startUrl appears to be completely ignored.  Users are redirected to log in, the url they came from is logged, and then they are redirected back to the site's "home" page every time.  Thanks for reading!  
I sent this in to SalesForce support as well but figured I'd ask here after they were unable to resolve the situation quickly.  I am convinced that the solution to this problem must be something simple but it is buried in SalesForce documentation somewhere and I'm too inexperienced with SF to know where to look.  

I'm trying to modify an existing login routine to redirect a user to a resource automatically.  Said another way, if a user bookmarks a particular resource on my site, I want to be able to redirect them to log in, then after succesfully logging in, I want them to be redirected back to the resource they were originally trying to access.  

Here is the code I am working with currently (extremely simple) and a screenshot of a log of the code running.  The relevant parts are highlighted.  
https://www.evernote.com/l/ANz7-J53DQpPP4jUQw_YikXkwM8HmnGBLB0

Here is the relevant documentation that guided me to this solution

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_sites.htm#apex_System_Site_login
https://help.salesforce.com/apex/HTViewHelpDoc?id=sso_provider_addl_params_start.htm&language=en_US

I'm missing something, because the startUrl appears to be completely ignored.  Users are redirected to log in, the url they came from is logged, and then they are redirected back to the site's "home" page every time.  Thanks for reading!