views:

369

answers:

2

is it possible to create a custom login page in salesforce.com? if so can anyone provide help to create the page and the validations part?

A: 

There's some information here, on the Salesforce ideas site. Salesforce.com does not currently support a custom login page, however it sounds like you maybe be able to accomplish this using Force.com sites.

Adam
Hi Adam, thanks for your response and i have bit confused.I thought salesforce.com is developing point for force.com. Is there any difference between them. Can you explain please
Bhoomesh
+1  A: 

A couple of things to think about:

  • Is this page going to be hosted on your website?
  • Is this going to be used for multiple salesforce organizations?

One thing you can do is use the login() API call to get a session id. You will be able to tell if the login fails, and alert the user appropriately.

From there, you will have to redirect the user through the "frontdoor.jsp" page which has the following format:

  • https://[host].salesforce.com/secur/frontdoor.jsp?sid=[session_id]&retURL=[start_page]

Where:

  • [host] - varies by organization. Some that I've seen are na1, na2, .... If you are only building this for 1 organization, you could hard-code this value. If you are building the for multiple organizations, you could parse it from the serverUrl property of the returned LoginResult.
  • [session_id] - get this from the returned LoginResult
  • [start_page] - this is optional but can be used to "deep link" a user to a page after they've logged in.
dana

related questions