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

Override List View with Visual Force Issue?

Hello everyone, I'm trying to override the "Go to list (x)+" link that displays in related list so that It points to a VisualForce page.


Overriding the List View for the object in the setup section took care of this, but in order to override the List View I must use a page that is linked to a StandardSetController (using recordSetVar) in order to have it as an available option for override.


Everything went fine untill that point.. but 


When displaying the records from the  standardset controller I get the list of All of the records and not only the ones from the related list i'm coming from.


I supposed this was because there was no way for my VF page to know which are the selected records, or something similar.. so I decided that then I should build my custom related list, but then I noticed that my VF page only recieves a rlid parameter with what I suppose is the id of the child relationship from the parent object.


However I don't have the parent Id anymore in the new page and I need this to create my custom set controller in order to get the correct set of records.

What's weird is that if I hover the "Go to list (x)" link I see that the url contains the same rlid parameter and the parent Id, but I'm not sure why the parent Id is removed when overriding the link with visualforce.


What would be ideal is that overriding a list view takes care of all of this, and that it knows that it should only display records from the parent object from which i'm coming from. Maybe this is possible and I'm doing something wrong, if this is the case let me know and I'll post my code. 


If this is working as designed, then I should build my custom related list but I need to find a way of getting the parent's id in order to limit the set of records.


Please let me know if anyone else has bumped into this. If this is working as designed, then what is the real purpose of overriding a List for an Object?


Thanks in advance!

Message Edited by jonathan rico on 02-03-2010 02:40 PM
Hi Jonathan, Did you manage to pass the parent Id of your relationship to your VF page? I am trying to do the same and I stack. Any advice will be very much appreciated. Thanks Zaidy

Hi Zaidy,


I wasn't able to find a workaround for this, until now there's no way of determining the Relationship id. Dynamic Apex only lets you find the Relationship name.


A possible  workaround, might be to save the relationship ID in a custom setting and then use this value to construct a URL that points to your VF page with both  parent and relationship ids. You could place a button on the related list and have this button redirect to this URL.


Not the best way to solve this.. but it's the only thing I can't think for now... 


Please let us know if you find another way of solving this.


Should we post an idea related to this?



Hi Jonathan, 

Thanks for replying. I just noticed that it is impossible. :smileysad: Yeah we should post this as an idea. It will speed up the development time if we manage to do this.