function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
apaiapai 

Urgent !!! Force.com site and Portal Integration - redirect to specific case record.

Hi,

 

Question - Is it possible to customize customer portal login page ?

 

Next, we are having issues integrating force.com site and customer portal. Here are the details: 

Business Case - The portal user clicks on thev link provided in the email.The site login page (branded login page) opens and the user enters the login credentials. Then, the user must be redirected to the case detai page on the customer portal.

 

Technical Details - We are using force.com site for user registration and login to the customer portal. The link used by the portal user looks like this : <site URL>?caseId=<ID>. We are using a Controller to do the authentication using Site.login().
On successful login, the user is redirected to the portal using this page ref URL : <SF base URL>/secur/login_portal.jsp?orgId=<>&portalId=<>&useSecure=true&loginType=3&un=<>&pw=<>&retUrl=<caseId>

 

Based on the retUrl parameter behavior, the user should be redirected directly to the case record page. Instead, it redirects to the Cases home page (default landing tab in the portal settings is Cases). Either we misunderstood the retUrl behavior or we are missing something in the URL. 

Before using the site login page, we used the standard customer portal login page and the redirection to ta specific case record detail page worked perfectly. The URL we used was - <SF Base URL>/secur/login_portal.jsp?orgId=<>&portalId=<>&retURL=<CaseID>. The user was asked to login using the standard portal login page and then, redirected to the case page.

 

But since we are now using the site, and need to pass login parameters, we have issues for redirection to a specific record.

We did a workaround to fix this issue as follows:

The user logs in from the site and then redirected to the portal with this URL - <Site URL>/<CaseID>. The user is redirected to the correct record page.Next, we encoutered another issue. We have custom buttons and links on the case page that uses VF page and javascript. Within this javascript we sforce.apex.execute method to update case record based on certain criteria. We read few posts on the developer boards and found that Sites do not have a session ID and hence, we cannot use sforce.apex.execute to update records or even retrieve data.

 

This is a priority 1 issue and needs to be fixed or have a workaround asap and cannot go live with the application unless this issue is fixed.

 

Thank you very much for your inputs !!

Best Answer chosen by Admin (Salesforce Developers) 
apaiapai

Issue Resolved. Had to use startURL instead of retUrl, as a customized Site login page was used.