Salesforce Visualforce detailタグの使い方のサンプル

環境
Salesforce

構文
apex:detail subject="{!Account.Id}" relatedList="false"/
にdetailタグのプロパティ「relatedList」をfalseに設定します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<apex:page standardController="Account">
<apex:pageblock title="{!Account.Name}">
<apex:pageblocksection title="出力情報">
<apex:outputfield value="{!Account.Id}" />
<apex:outputfield value="{!Account.Name}" />
</apex:pageblocksection>
</apex:pageblock>
<apex:detail subject="{!Account.Id}" relatedList="false"/>
<apex:relatedList subject="{!Account.Id}" list="Contacts" pageSize="100" />
</apex:page>
<apex:page standardController="Account"> <apex:pageblock title="{!Account.Name}"> <apex:pageblocksection title="出力情報"> <apex:outputfield value="{!Account.Id}" /> <apex:outputfield value="{!Account.Name}" /> </apex:pageblocksection> </apex:pageblock> <apex:detail subject="{!Account.Id}" relatedList="false"/> <apex:relatedList subject="{!Account.Id}" list="Contacts" pageSize="100" /> </apex:page>
<apex:page standardController="Account">
    
    <apex:pageblock title="{!Account.Name}">
        <apex:pageblocksection title="出力情報">
            <apex:outputfield value="{!Account.Id}" />
            <apex:outputfield value="{!Account.Name}" />
        </apex:pageblocksection>
    </apex:pageblock>
    
            <apex:detail subject="{!Account.Id}" relatedList="false"/>    

    <apex:relatedList subject="{!Account.Id}" list="Contacts" pageSize="100" />
</apex:page>

 

Salesforce

Posted by arkgame