You need to sign in to do that
Don't have an account?

How to achieve this functionality?
<apex:page standardcontroller="Program_Member_MVN__c" extensions="CaseCounter"> <apex:pageBlock title="Attachments"> <apex:pageblockSection > <apex:repeat value="{!results}" var="M"> <apex:repeat value="{!M.Attachments}" var="temp"> <!--<apex:pageBlockTable value="{!M.Attachments}" var="temp" > --> <!--<apex:pageBlockTable value="{!temp}" var="a">--> <!-- <apex:column value="{!temp}" title="Test"/>--> <apex:outputField value="{!M.CaseNumber}"/> <apex:outputField value="{!temp.Name}"/> <apex:outputField value="{!temp.LastModifiedDate}"/> <apex:outputField value="{!temp.CreatedById}"/> <!-- </apex:pageBlockTable>--> <!-- </apex:pageBlockTable>--> </apex:repeat> </apex:repeat> </apex:pageblockSection> </apex:pageBlock> </apex:page>Apex class:
public class CaseCounter{ //public List<AggregateResult> lstagr {get;set;} public Program_Member_MVN__c cs; public CaseCounter(ApexPages.StandardController controller) { cs=(Program_Member_MVN__c)controller.getRecord(); //List<AggregateResult> lstagr =[select sum(CountAttachment__c) tot from case where Program_Member_MVN__c =: cs.id]; //List<AggregateResult> lstagr = [SELECT id,(select sum(CountAttachment__c)tot from cases__r)FROM Program_Member_MVN__c WHERE id = :cs]; //List<Program_Member_Stage_MVN__c>Pms = [select id,(select CountAttachment__c from cases__r) from Program_Member_MVN__c where id = :cs]; //return lstagr; //List<Case> lstagr =[select id,(select Name,LastModifiedById,CreatedById from Attachments) from case where Program_Member_MVN__c =:cs.id]; // for(Case A:lstagr){} } /*public AggregateResult[] results { get { return [select sum(CountAttachment__c) tot from case where Program_Member_MVN__c =: cs.id]; } }*/ public List<Case> results{ get{ return [select id,CaseNumber,(select Name,LastModifiedById,CreatedById,LastModifiedDate from Attachments) from case where Program_Member_MVN__c =:cs.id]; } } }I should display outputlink for <apex:outputField value="{!temp.Name}"/> but it is not working if i give output link,visualforce is not displaying anything.Why is this happening?
Regards
All Answers
Use this code.
Regards
how can i add total row break after createdby so different records look distinctive?