请告诉我是否可以在单击记录上的批准/拒绝链接时显示自定义可视化实体页面,而不是显示标准的Salesforce批准页面。
如果有可能,那么请告诉我如何实现这一目标?
答案 0 :(得分:1)
按照以下方法覆盖标准审批流程页面。
specific
~Base()
<apex:page controller="ProcessInstanceController" tabStyle="Lead">
<apex:form>
<apex:sectionHeader title="Lead" subtitle="{!objLead.Name}"/>
<apex:pageBlock title="Approve/Reject Approval Request">
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Approve" action="{!approve}"/>
<apex:commandButton value="Reject" action="{!reject}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
Name <apex:outputField value="{!objLead.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Lead Owner <apex:outputField value="{!objLead.Owner.Name}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Rejection Reason <font color="red">(Mandatory while Rejection)</font><apex:inputField value="{!objLead.Rejection_Reason__c}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
Comments <font color="red">(Mandatory while Rejection)</font> <apex:inputTextArea value="{!objLead.Comments__c}" rows="5" cols="100"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>