in my VF page I would like to show a button Open in SalesForce if the current user is the approver of the record creator.

how could I check that in my VF Formula?

currently I am checking if the user is a member of the Systems team by setting a variable in my controller, then I check that alongside if the status is submitted like this:

<apex:outputPanel Id="sfButton" 
    rendered="{!isSystemsDept == true || (!sObjectRFC.Status__c == 'Pending')}"

but how could I determine if the user is the Delegated Approver for the record creator in that formula?

  • 1
    How are you defining the approver? Or are you asking about the record creators Delegated Approver? Feb 22, 2016 at 19:01
  • What do you mean by approver for the record creator? are you using approval process for your record, and you just want to retrieve the current approver of the record and check if the approver is current owner of the record?
    – sfdx
    Feb 22, 2016 at 20:03
  • @cricketlang: Sorry, yes you are correct, I am asking about the record creator's Delegated Approver Feb 23, 2016 at 9:09
  • UserInfo.getUserId() == Owner.DelegatedApproverId -> This would do the trick.
    – Vignesh V
    Apr 27, 2020 at 16:10


You must log in to answer this question.

Browse other questions tagged .