You need to sign in to do that
Don't have an account?

Embedding Partner Portal login page in visualforce Page
Hi all,
I want to embed partner portal login page into my visualforce page.
Can anyone please let me know how to do this?
You need to sign in to do that
Don't have an account?
Hi all,
I want to embed partner portal login page into my visualforce page.
Can anyone please let me know how to do this?
Change the login method to this:
return site.login(username, password, '/home/home.jsp');
Does that work?
All Answers
Hi,
Create a VF page, with the same look and feel as Partner portal login page.
Embed this VF page in your VF page.
When the users login, you need to pass the Organisation id , partner portal Id, User Id of partner portal user, Corresponding Contact id and the user name.
Substitue the values in the url and re-direct - /servlet/servlet.su?oid=valoid&suportaluserid=userid&retURL=/conid&targetURL=/home/home.jsp&suportalid=custportalid
where valoid - corresponding organization
Userid -customer portal user
conid - corresponding contact Id
custportalid - Id of the corresponding customer portal where you need to login.
Hope this helps.
Thanks
Hi Sureka,
I followed the method which you suggested; but when I login as a user from the VF page I get the following error message:
System.NullPointerException: Argument cannot be null.
I also tried accessing the VF page by making it a site and when I login there the page I get after hitting submit is down for maintenance.
Can you please tell me what can be done.
Thank you
Hi Sureka,
I had created a vf page with same look and feel of partner portal login page. When user login i am passing orgId,portalId,userId,contactId in the url and try to login by using site.login method on partner portal.
the controller login method is:
public PageReference login()
{
String startUrl = System.currentPageReference().getParameters().get('ap1.salesforce.com/secur/login_portal.jsp?orgId=00D90000000IExn&portalId=06090000000PeC9&retURL=/00390000001qmLH&targetURL=/home/home.jsp&suportaluserid=00590000000d0Qz');
return site.login(username, password, startUrl);
}
I am able to login on partner portal but after loging i am getting same vf login page on partner portal home page. After that if i go to other tabs like cases etc then its shows standard partner portal pages.
I want that username and password field on vf login page don't appear on partner portal home page.
Can you suggest how to do this or tell some alternate way to login on partner portal page from visualforce page?
I'm a little confused about what you are doing here.
Are you trying to create a public site that has a login to your Partner Portal? If so, when you create a new site, you'll get a page in your organization called "SiteLogin". You can use that as an example of how to create a login page.
The Apex method Site.login() only works in the context of a site, otherwise it won't work.
Hi Ryan,
When i am using site login page for login into partner portal then i am able to do that but after login i should get partner portal home page but i am getting site login page superimposed on partner portal home page. After login i get access to all tabs but username and password field is visible on partner portal home page. after that if i click some other tab then its behave normally and site login page disappear. I am not able to understand the reason for this.
Can you suggest something?
Change the login method to this:
return site.login(username, password, '/home/home.jsp');
Does that work?
Thank You Ryan,
It worked!
Thanks Ryan,
problem was with url. Now its working..
I have created a VF page for a site that is the login for portal users to goto the portal home page. I tried using your suggestion site.login (username,password,'/home/home.jsp'). The portal home page starts to load but immediately redirects to the standard salesforce login page with the following message:
"You have attempted to access a page that requires a salesforce.com login. If you are already a user of the system, please login below."
Here is the site VF Page and the controller.
Any ideas?
Thanks
I realize now that the site.login is only for the site. I modified the code to login to the portal as follows and it works correctly: