1

Is there a way on an overridden page to specify certain URL parameters? Specifically, I'm looking to set the "rowsperlist" for a related list.

This is how I'd like the overridden URL to look for a related list w/ ID "CorrList" on a page w/ ID "MyContact":

/apex/MyContact_CustomView?id=AAA000000000000111&sfdc.override=1&MyContact%3ACorrList%3Arowsperlist=80

FYI - The related list is identified as MyContact:CorrList.

0

It doesn't look like this is possible, because overriding the standard 'view' link for an sObject only allows you to specify a Visualforce page (or an S-Control), and to do this you would need to be able to specify a URL.

Workarounds for this require a controller extension. I think it's a safe assumption that you are using a controller extension, since you wouldn't be able to use your URL parameters otherwise.

Possible workarounds:

  • Hard-code the default(s) for your rowsperlist variable in the constructor of the controller extension instead of pulling it from pagereference.getParameters()
  • Set up a custom setting to hold your default value (or values), and pull the custom setting in the constructor of the controller extension
| improve this answer | |
  • Sorry - I never posted the answer - I didn't see the parameter for the related list before, and that did what I was looking to do. I didn't have a custom controller, since the object and its relationships are so complicated that pulling everything needed by the page was a mess (apparently "agile" can mean "we change our requirements every 20 minutes") – HungryBeagle Oct 7 '15 at 13:32
0

I found I should have used the "pageSize" parameter for the related list:

<apex:relatedList id="CorrList" list="Correspondence_To_Contacts__r" title="Correspondence" pageSize="500" />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.