-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
1Replies
Binding Apex Repeat (up to Five Levels)
APEX CLASSES
public List<cCampaign> getcCampaign(){
Campaign[] campParent = [Select Id, Name from Campaign where id = :c.Id];
ParentCmembers = [Select Contact.Id from CampaignMember where Campaignid = :campParent[0].id];
for (CampaignMember cm : ParentCmembers){
ParentMemberIds.add(cm.Contact.Id);
}
cCampaign x = new cCampaign(campParent[0],ParentMemberIds);
lCampaign.add(x);
CmParent.add(campParent[0].Id);
CmParentName.add(campParent[0].Name);
TotalCampaignIds.add(campParent[0].Id);
return lCampaign;
}
public List<cCampaign> getChildcampaign(){
Campaign[] campChild = [Select Id ,Name from Campaign where Parent_Campaign_Name__c like: CmParentName];
if (campChild .size() > 0){
for (integer i = 0; i < campChild.size();i++){
sCampaignIds.add(campChild[i].Id);
TotalCampaignIds.add(campChild[i].Id);
sCmChildlv3.add(campChild[i].Name);
}
ChildCmembers = [Select Id,Contact.Id,Campaignid from CampaignMember where Campaignid in :sCampaignIds];
for (integer i = 0; i < ChildCmembers.size();i++){
sContactid.add(ChildCmembers[i].Contact.Id);
}
for (integer i = 0; i < campChild.size();i++){
cCampaign childCampaign = new cCampaign(campChild[i],sContactid);
lChildCampaign.add(childCampaign);
}
return lChildCampaign;
}
else{
return null;
}
}
public List<cCampaign> getChildLvl3(){
Campaign[] campChild3 = [Select Id ,Name from Campaign where Parent_Campaign_Name__c In: sCmChildlv3];
sCampaignIds.clear();
if (campChild3.size() > 0){
for (integer i = 0; i < campChild3.size();i++){
sCampaignIds.add(campChild3[i].Id);
TotalCampaignIds.add(campChild3[i].Id);
sCmChildlv4.add(campChild3[i].Name);
}
ChildCmembers = [Select Id,Contact.Id,Campaignid from CampaignMember where Campaignid in :sCampaignIds];
for (integer i = 0; i < ChildCmembers.size();i++){
sContactid.add(ChildCmembers[i].Contact.Id);
}
for (integer i = 0; i < campChild3.size();i++){
cCampaign childCampaign = new cCampaign(campChild3[i],sContactid);
lChildCampaign3.add(childCampaign);
}
return lChildCampaign3;
}
else{
return null;
}
}
=============================================================================
PAGES
<apex:repeat value="{!cCampaign}" var="ch" rendered="{!NOT(ISNULL(cCampaign))}">
<tr>
<td colspan="5" HeaderValue="Campaign Name" style="width:40%">
<apex:outputLink title="" value="/{!ch.Cmp.Id}">
<apex:outputText value="{!ch.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!ch.fedCount}</td>
<td style="width:15%">{!ch.fedResponse}</td>
<td style="width:15%">{!ch.NonfedCount}</td>
<td style="width:15%">{!ch.NonfedResponse}</td>
</tr>
<apex:repeat value="{!ChildCampaign}" var="c2" rendered="{!NOT(ISNULL(cCampaign))}" >
<tr>
<td width="25px"></td>
<td colspan="4" style="width:40%">
<apex:outputLink title="" value="/{!c2.Cmp.Id}">
<apex:outputText value="{!c2.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!c2.fedCount}</td>
<td style="width:15%">{!c2.fedResponse}</td>
<td style="width:15%">{!c2.NonfedCount}</td>
<td style="width:15%">{!c2.NonfedResponse}</td>
</tr>
<apex:repeat value="{!ChildLvl3}" var="c3" rendered="{!NOT(ISNULL(cCampaign))}" >
<tr>
<td width="25px"></td>
<td width="25px"></td>
<td colspan="3" style="width:40%">
<apex:outputLink title="" value="/{!c3.Cmp.Id}">
<apex:outputText value="{!c3.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!c3.fedCount}</td>
<td style="width:15%">{!c3.fedResponse}</td>
<td style="width:15%">{!c3.NonfedCount}</td>
<td style="width:15%">{!c3.NonfedResponse}</td>
</tr>
</apex:repeat>
</apex:repeat>
</apex:repeat>
================================================
Question:
We are creating the Custom Campaign Hierarchy...
Campaign Itself
Child 1 Campaign
Child Child Campaign
Child Child Child Campaign
Child Child Child Child Campaign
Child 2 Campaign
-
- ars
- February 21, 2012
- Like
- 0
- Continue reading or reply
Report
Reports Tab/Object
Account and Contact Reports folder
Account Owner Report
How can I make that Account ID field displays an 18 digit ID instead of 15?
-
- ars
- January 16, 2012
- Like
- 0
- Continue reading or reply
18 digit vs 15 digit ID
new here
i am only seeing the first 15 digits id of a record in the url when i choose 1 record. is there a way for me to see the whole 18 digits?
-
- ars
- January 04, 2012
- Like
- 0
- Continue reading or reply
Binding Apex Repeat (up to Five Levels)
APEX CLASSES
public List<cCampaign> getcCampaign(){
Campaign[] campParent = [Select Id, Name from Campaign where id = :c.Id];
ParentCmembers = [Select Contact.Id from CampaignMember where Campaignid = :campParent[0].id];
for (CampaignMember cm : ParentCmembers){
ParentMemberIds.add(cm.Contact.Id);
}
cCampaign x = new cCampaign(campParent[0],ParentMemberIds);
lCampaign.add(x);
CmParent.add(campParent[0].Id);
CmParentName.add(campParent[0].Name);
TotalCampaignIds.add(campParent[0].Id);
return lCampaign;
}
public List<cCampaign> getChildcampaign(){
Campaign[] campChild = [Select Id ,Name from Campaign where Parent_Campaign_Name__c like: CmParentName];
if (campChild .size() > 0){
for (integer i = 0; i < campChild.size();i++){
sCampaignIds.add(campChild[i].Id);
TotalCampaignIds.add(campChild[i].Id);
sCmChildlv3.add(campChild[i].Name);
}
ChildCmembers = [Select Id,Contact.Id,Campaignid from CampaignMember where Campaignid in :sCampaignIds];
for (integer i = 0; i < ChildCmembers.size();i++){
sContactid.add(ChildCmembers[i].Contact.Id);
}
for (integer i = 0; i < campChild.size();i++){
cCampaign childCampaign = new cCampaign(campChild[i],sContactid);
lChildCampaign.add(childCampaign);
}
return lChildCampaign;
}
else{
return null;
}
}
public List<cCampaign> getChildLvl3(){
Campaign[] campChild3 = [Select Id ,Name from Campaign where Parent_Campaign_Name__c In: sCmChildlv3];
sCampaignIds.clear();
if (campChild3.size() > 0){
for (integer i = 0; i < campChild3.size();i++){
sCampaignIds.add(campChild3[i].Id);
TotalCampaignIds.add(campChild3[i].Id);
sCmChildlv4.add(campChild3[i].Name);
}
ChildCmembers = [Select Id,Contact.Id,Campaignid from CampaignMember where Campaignid in :sCampaignIds];
for (integer i = 0; i < ChildCmembers.size();i++){
sContactid.add(ChildCmembers[i].Contact.Id);
}
for (integer i = 0; i < campChild3.size();i++){
cCampaign childCampaign = new cCampaign(campChild3[i],sContactid);
lChildCampaign3.add(childCampaign);
}
return lChildCampaign3;
}
else{
return null;
}
}
=============================================================================
PAGES
<apex:repeat value="{!cCampaign}" var="ch" rendered="{!NOT(ISNULL(cCampaign))}">
<tr>
<td colspan="5" HeaderValue="Campaign Name" style="width:40%">
<apex:outputLink title="" value="/{!ch.Cmp.Id}">
<apex:outputText value="{!ch.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!ch.fedCount}</td>
<td style="width:15%">{!ch.fedResponse}</td>
<td style="width:15%">{!ch.NonfedCount}</td>
<td style="width:15%">{!ch.NonfedResponse}</td>
</tr>
<apex:repeat value="{!ChildCampaign}" var="c2" rendered="{!NOT(ISNULL(cCampaign))}" >
<tr>
<td width="25px"></td>
<td colspan="4" style="width:40%">
<apex:outputLink title="" value="/{!c2.Cmp.Id}">
<apex:outputText value="{!c2.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!c2.fedCount}</td>
<td style="width:15%">{!c2.fedResponse}</td>
<td style="width:15%">{!c2.NonfedCount}</td>
<td style="width:15%">{!c2.NonfedResponse}</td>
</tr>
<apex:repeat value="{!ChildLvl3}" var="c3" rendered="{!NOT(ISNULL(cCampaign))}" >
<tr>
<td width="25px"></td>
<td width="25px"></td>
<td colspan="3" style="width:40%">
<apex:outputLink title="" value="/{!c3.Cmp.Id}">
<apex:outputText value="{!c3.Cmp.Name}"/>
</apex:outputLink>
</td>
<td style="width:15%">{!c3.fedCount}</td>
<td style="width:15%">{!c3.fedResponse}</td>
<td style="width:15%">{!c3.NonfedCount}</td>
<td style="width:15%">{!c3.NonfedResponse}</td>
</tr>
</apex:repeat>
</apex:repeat>
</apex:repeat>
================================================
Question:
We are creating the Custom Campaign Hierarchy...
Campaign Itself
Child 1 Campaign
Child Child Campaign
Child Child Child Campaign
Child Child Child Child Campaign
Child 2 Campaign
- ars
- February 21, 2012
- Like
- 0
- Continue reading or reply