Author Archives: Biswajeet

About Biswajeet

Biswajeet is my Name, Success is my Aim and Challenge is my Game. Risk & Riding is my Passion and Hard Work is my Occupation. Love is my Friend, Perfection is my Habit and Smartness is my Style. Smiling is my Hobby, Politeness is my Policy and Confidence is my Power.

How to use apex:detail in visualforce page?

Apex Controller:

public class TestApexDetail {
    public Id AccountId {get;set;}
  
    public TestApexDetail() {
        Account objAC = [SELECT Id From Account LIMIT 1];
        AccountId = objAC.Id;
    }
}

Visualforce Page:

<apex:page controller="TestApexDetail">
    <apex:form>
        <apex:detail subject="{!AccountId}" relatedlist="false"></apex:detail>
    </apex:form>
</apex:page>

Output:

download