1
  1. How do I change the label of approval overall status?
  2. Is it possible if the overall status label is based on a picklist field on the object of the approval process?

ex. Approved => Accepted , Pending => Under Review enter image description here

1 Answer 1

4

There is no option to override standard label except overriding standard detail page with custom visualforce page and update the value using jquery or javascript

<apex:page standardController="Account">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

<script>
$( document ).ready(function() {
    $(".extraStatus").each(function( index ) {
           if($(this).text()=='Pending'){
               $(this).text('Under Review');
           }
           if($(this).text()=='Approved'){
               $(this).text('Accepted');
           }

    });
});

</script>

<apex:detail subject="{!Account.id}" relatedList="true" relatedListHover="true"/>
</apex:page>

and It will output in following way

enter image description here

You need to override the standard view action as following way

enter image description here

7
  • thx so much for the idea...how about the approve/reject option, will the related list also include it?
    – Micz Domz
    Commented Mar 5, 2016 at 18:59
  • yes it will contain exact same layout as your detail page with all options
    – Himanshu
    Commented Mar 5, 2016 at 19:00
  • @Himanshu..I see that it works like the salesforce layout but my problem is when I approve/reject I get redirected to the salesforce layout instead of being back to the visualforce page...is it possible to redirect back to that vf page?
    – Micz Domz
    Commented Mar 5, 2016 at 19:12
  • You need to override the standard view button which you can do from Setup->customize->account object and button and links
    – Himanshu
    Commented Mar 5, 2016 at 19:14
  • @Himanshu..I have an idea..is it possible to only display the approval history related list in the visualforce page instead of the whole salesforce layout? If so then I will just replace the related list of the approval history with the visualforce page version...
    – Micz Domz
    Commented Mar 5, 2016 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .