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
Amrik DasAmrik Das 

How to show the Comments from Approvers of an Approval Process in a VF Page?

I wish to show the status and comments of an approval process in a VF Page.

How should I proceed with it?

SRKSRK
Try this
it query and return ProcessInstance  only if it is approved

ProcessInstance  ProcessObj = [select id,name from ProcessInstance where TargetObjectId = <Id of the record> and Status = 'Approved'];

then using ProcessInstance id you can query the steps and Comments and can show the Comments on VF page
So if you having only 1step it  will have only one Comments 

SELECT Id, (SELECT Id, StepStatus, Comments FROM Steps) FROM ProcessInstance where id = ProcessObj .id