2022 Developer Survey is open! Take survey.
10 votes
Accepted

Adding new "Files" related list to Visualforce page

Hey looking into your question this is the solution for you. You need to use AttachedContentDocuments <apex:page standardController="Account"> <apex:relatedList subject="{!Account.Id}" ...
user avatar
10 votes
Accepted

Filter in Related List using fields from related record

There's three options available that I know of. Use an existing, third party Lightning component that provides filtered related list functionality, such as this one from Salesforce Labs. (Disclaimer: ...
user avatar
  • 86.1k
8 votes

Making related list as mandatory

You can do something like this with standard functionality. It doesn't fit your requirement perfectly, but may work. Create a roll-up summary field that counts the number of detail records. Create a ...
user avatar
7 votes
Accepted

Showing Multiple Related list for the Same Object

I think you can achieve it by doing following : Create two lookup of Account object (Parent object) on Contact (Child Object) On child object you can make these lookup visible based on record types. ...
user avatar
  • 2,212
7 votes
Accepted

Show more than 4 columns in Salesforce Lightning Related Lists

Currently you cannot view more than 4 columns in lightning related view. There is a idea currently and status shows as Currently in development. Hopefully it should be available soon. Idea link You ...
user avatar
7 votes
Accepted

Layout - How to rename related lists?

You can change the Related List Label by modifying the Related List Label field on the field that references the parent object. In your case, if you go to the object CaseBugJunctionObject, edit the ...
user avatar
  • 430k
6 votes
Accepted

Choosing Columns to display in <apex:relatedList />

Content of <apex:relatedList> will match what your user would see for same record on standard page layout. So your best choice is to configure the list on page layout. Remember that if you still ...
user avatar
  • 23.6k
6 votes

Formula field on parent object to get last related list record field

Parent objects can't look 'down' to child objects in that way for Lookup relations. You can look 'up' to a parent (from the Child), but not down to the child (from the Parent). In fact, if you go to ...
user avatar
6 votes
Accepted

Having Trouble with Parent-to-Child lookup/SOQL Query

You can get the API Name of the child relationship as follows via Execute Anonymous: for (ChildRelationship relationship : SObjectType.Request__c.getChildRelationships()) if (relationship....
user avatar
  • 142k
6 votes
Accepted

How to Query 2 Objects Down Parent to Child SOQL in APEX Class

This is one of the most confusing aspects of relationship queries in SOQL. The FROM clause in your subquery does not specify the name of the child object. It specifies the name of the relationship, ...
user avatar
  • 86.1k
6 votes
Accepted

Can I use getListUi method with Related List Views?

Currently, no. That @wire adapter does not allow relative parent (flexipage record Id). On the roadmap (no ETA) is the lightning:relatedList base component, so whenever that is released we might be ...
user avatar
  • 3,545
5 votes

How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?

For notes and attachment use following name in tag:- <apex:relatedList subject="{!account}" list="NotesAndAttachments" /> For Activity History: <apex:relatedList subject="{!customObject__c}...
user avatar
  • 22.2k
5 votes
Accepted

Related List not visible for selection from Page Layout

Since the lookup is from Partner to Contact, you'll see only fields on the "child" side of the relationship. If you go to Setup > Customize > Contacts > Page Layouts, you can add both related lists (...
user avatar
  • 430k
5 votes
Accepted

Can we rename related list "Notes & Attachment"?

Yes, you can, but you will have to use Visualforce. Here's an example of how to override the header: <apex:page standardController="account"> <apex:relatedList list="notesandattachments"&...
user avatar
5 votes
Accepted

Handling Related List Security in Override VF pages

You may consider trying this: <apex:relatedlist list="ChildObject__r" title="Child Records" rendered="{!$ObjectType.ChildObject__c.accessible}"/> This would check if the loggedIn user has ...
user avatar
  • 1,957
5 votes
Accepted

Visualforce customization isn't displaying multiple fields

The reason for this issue is that the relatedList is not named "Campaign Histories" Use: <apex:relatedList list="CampaignMembers"/> apex:relatedList list= values have to be valid relationship ...
user avatar
  • 61.4k
5 votes
Accepted

How to customize the record related list in lightning community

Not all standard components are available in Community Builder as available in App Builder. It also depends on the type of page you are creating. Refer to below excerpt from the documentation: The ...
user avatar
  • 28.9k
4 votes

Sort activities in a related list by a specific column

Currently its not possible to sort open activites.Here is the idea https://success.salesforce.com/ideaview?id=08730000000BqX6AAK Workaround : Create a list button on Task with URL value as /007?id={...
user avatar
  • 13.3k
4 votes
Accepted

How to get the RelatedListId (rlid) of a certain related list in a custom object?

Solved the problem. The so called "RelatedListId" is the Id of the custom field of the Master-Detail relationship on the detail object. We were able to query this Id with the tooling-api described by ...
user avatar
4 votes

Limit for Related Look-up Lists

You can have as many custom objects as you want, you just can't reference them in your workflow, formula fields and validation rules during the same execution context by spanning more than 10 objects. ...
user avatar
  • 40.3k
4 votes

Need to hide the column in my pdf?

Something has simple has this could work: <apex:page standardController="Opportunity" showHeader="false" renderAs="pdf"> <apex:pageblocktable value="{!Opportunity.bucketRate__r}" var="b" ...
user avatar
  • 4,956
4 votes

How to create a Show/Hide Button on Contact Related List in Salesforce

In this scenario, rather than creating some custom code to do that, have you considered just setting a Sort Order on the Status field to group all of your Active Contacts at the top of your related ...
user avatar
  • 19.5k
4 votes

Can someone please explain what "related lists" are?

Related lists are lists of records that are directly related to another record. They are created automatically when a lookup field is created on an object, and there are many standard related lists, ...
user avatar
  • 430k
4 votes
Accepted

How do I reference related record (__r) field value from query

You forgot the Position p object in your loop. Try : List<Position__c> Positions = [SELECT Name, Department__c, Job_Matching_Title__r.Name, Job_Matching_Title__r.Salary_Range_Avg__c FROM ...
user avatar
  • 3,518
4 votes
Accepted

Remove or Hide New task/New Event button from Activity List View

You would need to go and edit the page layout for the object you want to do this for. Find the Open Activities and Activity History related lists. Click on the Wrench Icon, and go to the Buttons ...
user avatar
4 votes
Accepted

can I concatenate field values form a related list into a formula field?

The only way to do this is with a trigger that does the concatenation when the child record is inserted, updated, or deleted. This is a very costly trigger to write and you should proceed with ...
user avatar
4 votes
Accepted

Adding a link in a related list

You can create a formula field. Choose "Text" type, then use the HYPERLINK function referencing the Id of the record : HYPERLINK("/" & Id, "View") Just add the field to the related list. But it ...
user avatar
4 votes
Accepted

Adding a button for every record in a related list

You can only add the button to the header of the related list, as opposed to each row. However, you can also enable the option to show checkboxes on the related list, which allows users to check any ...
user avatar
  • 430k
4 votes
Accepted

Populate Flow variable with Parent Id - from VisualForce page - launched by related list Custom Button

You have to make the Custom Button as an onclick javascript button and then open the VF Page by passing the opportunity id as a parameter to the page (say call id oppId) and then pass that parameter ...
user avatar
4 votes
Accepted

Related list button not displaying on opportunity record in Lightning Experience

Javascript custom buttons are not supported in Lightning. Read here, it says: Custom buttons that use a JavaScript content source aren’t supported in Lightning Experience. You can replace some of ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible