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
venkatsforcevenkatsforce 

Force.com site LoginRedirect

Hi

 

     Am new to Force.com site development, when i using Force.com site login page at that time i give the logincredentials of the PartnerPortal user login details and then it moves to portal page, i want to redirect the page to Force.com site page instead of  portal page...As I use this url as https://partnerportalurl?username&password/apex/vfpage but i got the error as Unable to load the Visualforcepage.i dont know how to redirect..Is there any possibilities?

 

 

Regards

========

VenkatSForce

Sonam_SFDCSonam_SFDC

Hi Venkat,

 

What you can do here is customize the landing page for your Partner Portal and have your visualforce page setup as the landing page.

 

Follow the stpes in the doc below to get that setup:

https://help.salesforce.com/HTViewHelpDoc?id=partner_portal_available_tabs.htm&language=en_US

 

Hope I've understood your requirement and the suggestn helps!

venkatsforcevenkatsforce

Hi

 

       Thanks for your reply @sonam_sfdc ,here am trying after the partner portal login will be succes it doesn't redirect to the particular visualforce page, it moves to AuthorizationRequired site standard login page...

 

i using the code as

 

public class PortalAccess {
    
    public String username {get; set;}
    public String password {get; set;}
    public PageReference login() {
        String startURL = 'https://ap1.salesforce.com/secur/login_portal.jsp';
               startURL += '?orgId=00D90000000pw4Z&portalId=060900000005BmN&loginType=3';  
               startURL += '&startURL=&loginURL=&useSecure=true';
               startURL += '&un=' + username;
               startURL += '&pw='+ password;
               startURL += '?/apex/Loginpage1';               
               if(username!='' && password!='')
               {
                   PageReference pg = new PageReference(startURL);
                   pg.setRedirect(true);
                   //String CurrentUrl =  System.currentPageReference().getParameters().get('startURL');
                   //PageReference p = Site.login(username,password,startURL);
                   if(pg!=null)
                   {
                       return pg;
                   }else{
                       return pg;
                       }
               }
        return null;
    }

}

 

Is there any other possible way to write the controller class, to ridirect the portalpage to visualforce page after the login successfull.

 

Thanks

=========

Venkatsforce