You are on page 1of 2

1.

account,contact
2. account, opportunity
3. account, case
4. contact, opportunity
5. lead, campagin
6. lead, contact
7. account,contract
8. opportunity,product

Create rollup summary field on std object. Child should be standard only

===================================================================================
=============
public class March24_ExtStandard1Controller {
public string str {get;set;}
public list<wrapopty> optwralist {get;set;}

public March24_ExtStandard1Controller(apexpages.StandardController std){


//account record
str = std.getId();
system.debug('str==>' + str);
account acc = (account)std.getRecord();
system.debug('acc==>' + acc);
}

public void allchildopty(){


optwralist = new list<wrapopty>();
//fetch all child oopties for this account with query
//iterate all opties and preperae list wrapper data
//assigne to class level variable
}

public class wrapopty{


public boolean isseelcted {get;set;}
public opportunity op {get;set;}
public wrapopty(){
isseelcted = false;
op = new opportunity();
}
}
}

===================================================================================
=====================
09:04

Salesforce Mohan

<apex:page standardController="account" showHeader="false"


extensions="March24_ExtStandard1Controller">
<!-- This is my Extension example -->
<apex:form>
<apex:pageBlock title="Standard Controller">
<apex:pageBlockSection title="account record">
<apex:inputField value="{!account.name}" />
<apex:inputField value="{!account.site}" />
<apex:inputField value="{!account.industry}" />
<apex:inputField value="{!account.rating}" />
</apex:pageBlockSection>
</apex:pageBlock>

<apex:pageBlock title="opportunity records">

</apex:pageBlock>
</apex:form>
</apex:page>
===================================================================================
============================

09:42

Salesforce Mohan

<apex:page showHeader="false" standardController="contact" recordSetVar="conList">


<apex:form>
<apex:pageBlock title="contact list">
<apex:dataTable value="{!conList}" var="c" border="1" cellpadding="5"
bgcolor="white">
<apex:column headervalue="Last Name">
<apex:inputField value="{!c.lastname}"/>
</apex:column>
<apex:column value="{!c.phone}" headervalue="phone"/>
<apex:column value="{!c.email}" headervalue="email"/>
</apex:dataTable>
</apex:pageBlock>
</apex:form>
</apex:page>
==============================================================================

<apex:page showHeader="false" standardController="account" >


<apex:pageBlock mode="edit">
<apex:pageBlockSection title="account record details" >
<apex:outputField value="{!account.id}"/>
<apex:outputField value="{!account.name}"/>
<apex:outputField value="{!account.site}"/>
<apex:outputField value="{!account.industry}"/>
<apex:outputField value="{!account.rating}"/>
</apex:pageBlockSection>

<apex:pageBlockSection title="child oppty list">


<apex:pageBlockTable value="{!account.Opportunities}" var="op">
<apex:column value="{!op.name}"/>
<apex:column value="{!op.stagename}"/>
<apex:column value="{!op.closedate}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>

<apex:pageBlockSection title="child oppty list">


<apex:pageBlockTable value="{!account.Contacts}" var="c">
<apex:column value="{!c.lastname}"/>

=====================================================================

You might also like