+ Start a Discussion
tganikumartganikumar 

Approval History Fields

How to use Approval History object in visualforce page. And also what are the API Names of Approval Request and Satus field API Name. Give the feedback as soon as possible./

Navatar_DbSupNavatar_DbSup

Hi,

Try the below code snippet as reference:

 

----------vf page -------------------

<apex:page standardcontroller="case" >

<apex:relatedList list="ProcessSteps" ></apex:relatedList>

    <apex:form >

            <apex:pageBlock id="thePageBlock">

                <apex:pageBlockTable value="{!case.Histories}" var="h">

                <apex:column headerValue="Date"  value="{!h.createddate}"/>

                <apex:column headerValue="What" value="{!h.field}"/>

                <apex:column headerValue="From" value="{!h.oldvalue}"/>

                <apex:column headerValue="To"   value="{!h.newvalue}"/>

            </apex:pageBlockTable>

        </apex:pageBlock>

    </apex:form>

</apex:page>

 

API Names of Approval Request and Status field API Name:  Approval and Status

 

[Select a.SystemModstamp, a.Status, a.RequestComment, a.ParentId, a.OwnerId, a.LastModifiedDate, a.LastModifiedById, a.IsDeleted, a.Id, a.CreatedDate, a.CreatedById, a.ApproveComment From Approval a]

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.