【发布时间】:2012-09-24 18:04:50
【问题描述】:
我在联系人记录中有一个名为“Gift_c”的自定义对象。我想用 visualforce 页面替换标准的“Gift_c”页面,以便我可以有选择地隐藏某些字段。
一切都非常简单。
<apex:page standardController="Gift__c" showHeader="true" >
<apex:form >
<apex:pageBlock title="" mode="Edit">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Basic Information" columns="1">
<apex:inputField value="{!Gift__c.Contact__c}"/>
<apex:inputField value="{!Gift__c.GiftAmount__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
挑战:
通常,当您在联系人中并且我单击“新礼物”按钮时,礼物中的 Contact_c 字段_c 对象会填充为我刚刚来自的人。如何确保在新的 Visual Force 页面上仍然发生这种情况
【问题讨论】: