Activity Forums Salesforce® Discussions What is the use of apex:detail component in Salesforce?

  • Prachi

    Member
    August 9, 2018 at 9:03 AM

    Hello Avnish,

    The standard detail page for a particular object, as defined by the associated page layout for the object in Setup. This component includes attributes for including or excluding the associated related lists, related list hover links, and title bar that appear in the standard Salesforce application interface.

    Thanks.

  • [adinserter block='9']
  • Avnish Yadav

    Member
    August 9, 2018 at 9:04 AM

    Thanks.

  • shariq

    Member
    September 16, 2018 at 5:39 PM

    Hi,

    To understand it more here is the example –

    <apex:page standardController=”Account”>
    <apex:detail subject=”{!account.ownerId}” relatedList=”false” title=”false”/>
    </apex:page>

    Hope this helps.

  • Parul

    Member
    September 17, 2018 at 6:25 AM

    Hi

    <apex:detail>:
    The standard detail page for a particular object, as defined by the associated page layout for the object in Setup. This component includes attributes for including or excluding the associated related lists, related list hover links, and title bar that appear in the standard Salesforce application interface.

    Visualforce page:

    <apex:page controller=”Sample”>
    <apex:form >
    <h1>Below is the Account detail</h1>
    <apex:detail subject=”{!AccountId}” relatedList=”false”/>
    </apex:form>

    </apex:page>

    Apex Controller:

    public class Sample {
    public Id AccountId {get;set;}

    public Sample() {
    AccountId = ‘0019000001BoVNx’;
    }
    }

    thanks

Log In to reply.