+ Start a Discussion
iyappan kandasamy 4iyappan kandasamy 4 

how to fetch approver name from approver id in salesforce apex class

In my requirement for the case object...there is 'approval history'...in that I want the 'actual approver' name in my apex class. For this i have written the apex extension class...and in my visual force page i have to stamp this value....

Apex extension class:
-----------------------------
public with sharing class gkrefundrequest
 {
  public Id caseId {get;set;}
  public case caserecord {get;set;}
  public String approver{get;set;}  
  public list<ProcessInstance> lista{get;set;}

  
  public gkrefundrequest(ApexPages.standardController stdController)
  {
  this.caseId = stdController.getId();          //The stdcontroller will get the case record id
  lista = new list<ProcessInstance>();
  lista = [SELECT LastActorId,SubmittedById FROM ProcessInstance where Id =: this.caseId]; // for that particualar case this query will fetch approver id
  }  
  }

My visual for page where to stamp the 'actual approver' value is:
------------------------------------------------------------------------------------
<tr>
                    <td><b>Sales Approval:</b></td>
                    <td>{!case.caseid }</td>
                </tr>
                

but the above thing is not working....only im getting the actual approver id....
Please kindly need help on the above as it is urgent...I have to submit tomorrow...
Thanks in advance...
 
iyappan kandasamy 4iyappan kandasamy 4
Kindly need solution for the above...Its urgent...Thanks...
iyappan kandasamy 4iyappan kandasamy 4
Kindly need solution for the above...Its very very urgent...Thanks...