You need to sign in to do that
Don't have an account?
![Tre Pedigo Tre Pedigo](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Using a controller to modify the vf page URL
Hello all,
I have two objects (Taskray Project and Taskray Task). Within each taskray task I would like to display specific detail fields about its related taskray project. I have created a visual force page for this, but my problem is that (from what I can tell) the visual force page does not recognize the relationship between the two objects unless the record id is entered into the URL. So my question is, is it possible to edit the URL of the vf page to include this record id through the usage of a controller. And if so, how would I go about doing that? My thought process is that the controller would grab the related taskray project depending on what taskray task was currently opened, grab the record id of the project and then place it into the URL of the vf page so that the vf page knows which record it needs to pull data from.
Also, i'm pretty new to salesforce so any sample code on how to do this would be greatly appreciated!
Thank you all
According to my understanding I have drafted a scenario
Example - I have a list of Contact record displayed in VF page, when I click on a contact record its parent Account should be displayed
For the above functionality you can use pagereference and append account id for the same
Thanks for the response, but that's not quite what I'm looking for. Here is what I need to see.
Example - If I have an extra tab within a contacts' page (this would be the vf page) then I need it to display additional details about that specific contact automatically.
For reference -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_System_PageReference_setRedirect.htm