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
kiran kumar 131kiran kumar 131 

how to get record id from one visualforce to another visualforce page

Hi,

  I have requirement that,when a user creates a record the external user will get an email with the record URL(i.e.with record ID) along with an autogenrated password.So once the external user clicks on the link in his emial it navigate to a login page to enter the autogenerated password which he has got through email to access that responding record.

Please help me how to achieve this functionality.
Darshan FarswanDarshan Farswan
Hi Kiran,

You must be sending the URL to the external user via email to login into the system. In order to redirect user to a specific records, simply add a URL parameter named startURL to your URL. Here is an example :

Initial Login URL : https://login.salesforce.com
URL for redirection : https://login.salesforce.com/?startURL=%2F00OD0000006UJR7

Your host can be any instance, you only need the startURL for redirection. 
kiran kumar 131kiran kumar 131
Hi Darshan,

  Thanks for your answer.My question is ,after receiving an email with record url and an auto generated password.The external user once clicks on the link it navigates to the page where the user will give the autogenrated password to access the record.Here verification needs to be done that whether the user entered correct password or not.After entering the correct password once user cllicks on Login button the page needs to navigate to the record.(Which he got in the mail).

Please share example if possible.
Darshan FarswanDarshan Farswan
Hi Kiran,

I have given you the example for the specifying the url paramemeter. You must be using Salesforce Sites in order to provide login access for external users. Can you please provice the Salesforce link that is being sent to the external users via email.
kiran kumar 131kiran kumar 131
Hi Darshan,

    Here are the details which the external user will receieve,

Please find the details below.
One Time Password :1198
To review the details, Please click on the following link : http://spe-supplier-developer-edition.ap1.force.com/spe/?id=a0I9000000Gl3FqEAJ.

So once the external user clicks on the link,it navigates to the record before that he has to enter the One Time Password to access that particular record.If he enters other than 1198 it needs to throw an error.

We are using Force.com site for external users.
 
Darshan FarswanDarshan Farswan
So you are using the Sites to implement the page to external user.
I tried the URL and it worked worked for me. Didn't as me for the password. Well we can ignore that for now.

I do not know much about your Site structure, but can you try the following URL :
http://spe-supplier-developer-edition.ap1.force.com/spe/a0I9000000Gl3FqEAJ

This will send the record to the site directly.