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
di_zoudi_zou 

How do I create a custom customer portal login?

I would like to build a custom page for the customer portal login. How would I do that?

 

I found this stuff after some googling:

http://brianpeddle.com/2011/06/06/building-a-custom-salesforce-login/

http://boards.developerforce.com/t5/Visualforce-Development/Customer-Portal-Login-Page-Customization/td-p/90188

but I don't really understand what's going on in those two posts. Is there a better tutorial somewhere else?

Best Answer chosen by Admin (Salesforce Developers) 
SabrentSabrent

To Customize the customer portal login screen do this -

1. If you have a logo, first save the logo in Documents.
2. Then Create a HTML file, like this - ( Copy the code below in Notepad and save with an extension htm)

<html>
<table>
 <tr>
      <td width="40px">
      </td>
     <td width="800px">
      <br/><br/>
  <img src="https://c.na9.content.force.com/servlet/servlet.FileDownload?file=015Q00000001H9u" />   <!--Note: this is the  reference to the Logo you save in Step1 -->
      <br/><br/>&nbsp;Welcome to MyCompany's Customer Portal. Please type in your user name and password to login
      </td>
   </tr>    
 </table>
</html>

3. Save the above HTML file in Documents tab

4. Finally, go to Customize > Customer Portal > Settings > 'Find the correct portal' > 'double click' > Edit > 'Under the section "Look and Feel", in the Login Message, browse and upload the html file '

Let me know if you have any questions.




All Answers

SabrentSabrent

To Customize the customer portal login screen do this -

1. If you have a logo, first save the logo in Documents.
2. Then Create a HTML file, like this - ( Copy the code below in Notepad and save with an extension htm)

<html>
<table>
 <tr>
      <td width="40px">
      </td>
     <td width="800px">
      <br/><br/>
  <img src="https://c.na9.content.force.com/servlet/servlet.FileDownload?file=015Q00000001H9u" />   <!--Note: this is the  reference to the Logo you save in Step1 -->
      <br/><br/>&nbsp;Welcome to MyCompany's Customer Portal. Please type in your user name and password to login
      </td>
   </tr>    
 </table>
</html>

3. Save the above HTML file in Documents tab

4. Finally, go to Customize > Customer Portal > Settings > 'Find the correct portal' > 'double click' > Edit > 'Under the section "Look and Feel", in the Login Message, browse and upload the html file '

Let me know if you have any questions.




This was selected as the best answer
di_zoudi_zou

Thanks!

I made my html page and uploaded it as a documnet. I also uploaded my logo as a document. I also set both of them as publically available. I set the html documnet as my Customer Portal Login Message. All the text in the html document shows up on my customer portal. However, the image is not showing up. If I login to my customer portal and then go back to the customer portal login page, the image shows up. I can also access the direct link to the image only if I am logged in to Salesforce. How do I make the image to everybody instead of only people who are logged into salesforce?

SabrentSabrent

Have you set the 'Externally Available Image' checkbox to true?

Also, Check your image Source url. Copy this same URL, except change the salesforce instance (i.e replace na9), id and oid

https://na9.salesforce.com/servlet/servlet.ImageServer?id=00000001D4Xx&oid=00D20000008xxx

where,
id=00000001D4Xx is the record ID for document in the Document Tab
oid=00D20000008xxx is your Organizational ID (or, OID) in Salesforce.com

di_zoudi_zou

Got it, thank you! I had the wrong source url in my html document.

jayujayu

I have created the login and registration page. But on this page when i enter the username and password , there is an error that  " Your login attempt has failed. The username or password may be incorrect, or your location or login time may be restricted. Please contact the administrator at your company for help. ". I have checked the login time settings and that are proper. I am little bit confused that which username and password i have to enter there. ???? Anybody can help me, please???

jayujayu

Plz , can u tell me , how to login in our customer portal???

SabrentSabrent

Have you enabled the login for users?

 

Customize > Customer POrtal > Settings

 

Look for checkbox  'Login Enabled' make sure it's checked.

 

Let me know how you go.

jayujayu
I have enabled all the settings properly. I m able to see the login and
registration windows only but I m not able to log in and register the
users here. So , I m confused what to do next????
I thought , there may be an issue of user license , but I have clicked on
it in settings to activate it. So, is there any other issue of permission
or license ??

Thanks a lot for reply.
SabrentSabrent

Have you tried resetting the password of the portal user?
when you go the portal login page, put in the username of the portal user and click forgot password. An email will be sent to the portal user with a new password.

 

Let me know how you go..

MohaMoha

Hello, Good Answer but i've got a question can we log into Salesforce Site and register as a Contact then Login with username and password of that Contact ad not as a User, please give me an answer

Sameer SheikhSameer Sheikh

Hi Rida

 

No you can't. Either the user has to be the Org User or a portal User. You need to setup a username and password, which is only provided in case when you create it as a user/portal user in the org and not just contact.

 

Sameer Sheikh