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
ckellieckellie 

How to render Approval related list in VFpage?

I need to include the record approval submission buitton and approval history related lists on my vfpage. I am using the code below, but the related list is not rendering?

 

<apex:relatedList list="ProcessInstance"/>
<apex:relatedList list="ProcessInstanceHistory"/>

 

I am recieving the error:

'ProcessInstance' is not a valid child relationship name for entity PCN

 What is the correct name for the approval related list?

 

Thank you

Best Answer chosen by Admin (Salesforce Developers) 
Arun MKArun MK

Hi,

 

You have to use this.

 

<apex:relatedList list="ProcessSteps"/>

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

 

Regards,

Arun

All Answers

Arun MKArun MK

Hi,

 

You have to use this.

 

<apex:relatedList list="ProcessSteps"/>

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

 

Regards,

Arun

This was selected as the best answer
ckellieckellie
Thank you for your quick reply.