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
carramrodcarramrod 

Simple Visualforce related list question

My goal in this page is to be able to rename the standard related list "Notes And Attachments" to something else. Since this is a standard related list, it cannot be changed without Visualforce (AFAIK).

 

I have successfullly created a visualforce page to display the Account object, and was able to manually add all the related lists (and rename the notes and attachments related list), but my problem is that i have some custom objects that are hidden from many users. By adding them manually, these users will get errors in viewing the page if it's overriden. Is there a way to render the <apex:Detail relatedlist="false">, add the Notes And Attachment related list (renamed of course), and then have all the rest of the generated lists <apex:detail relatedlist="true"> ??

 

I tried to do it here, but obviously it adds the AccountDetail twice.:

 

 

<apex:page standardController="Account"> <apex:detail relatedList="false"/> <apex:relatedList list="NotesAndAttachments" title="Notes And Attachments (Topic Memo)"/> <apex:detail relatedList="true" /> </apex:page>

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Sam.arjSam.arj

It's not possible to that.

Only option is to add all the related lists one by one yourself to the visualforce page along with the one you intend to change its title.

All Answers

Sam.arjSam.arj

It's not possible to that.

Only option is to add all the related lists one by one yourself to the visualforce page along with the one you intend to change its title.

This was selected as the best answer
carramrodcarramrod

Okay, i understand. I have a related question though that i'm probably missing something elementary.

 

I've created the following code and while the related lists' rendered= "{!isMarketing}"works, it doesn't work using OR or AND, even though when i print out those statements above the related list i get valid true/false values

 

<apex:variable var="isAdmin" value="{!if(OR($User.ProfileId = '00e70000000sxjT',$User.ProfileId = '00e70000000weF5',$User.ProfileId = '00e70000000w1Dc'),true,false)}" /> <apex:variable var="isMarketing" value="{!if(OR($User.ProfileId = '00e70000000wuVC',$User.ProfileId = '00e70000000vuQC'),true,false)}" /> isAdmin: {!isAdmin} <br/> isMarketing: {!isMarketing}<br/> isAdmin/Marketing: {!OR(!isAdmin,!isMarketing)} --THIS WORKS isMarketing: {!AND(isMarketing)} -- THIS WORKS <apex:relatedList list="NotesAndAttachments" title="Notes And Attachments (Topic Memo)" rendered="{!AND(isMarketing)}"/> --THIS DOESN'T WORK HERE, BUT PRINTS OUT CORRECTLY ABOVE.