- How do I change the label of approval overall status?
- Is it possible if the overall status label is based on a picklist field on the object of the approval process?
1 Answer
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
You need to override the standard view action as following way
-
thx so much for the idea...how about the approve/reject option, will the related list also include it? Commented Mar 5, 2016 at 18:59
-
yes it will contain exact same layout as your detail page with all options– HimanshuCommented 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? 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– HimanshuCommented 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... Commented Mar 5, 2016 at 19:16