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

it's Very Urgent Display Count and using that count individually Leads assign to User
Checkbox user fieldnames fieldname2 fieldname3 Total
checked test@test.com 1 2 3 5
checked test1@gmail.com 1 1 1 3
total =8
this type of formate i want please Help me.it's very urgent requirement
if i'm click checkbox assign leads individually
All Answers
No yar.
i.e only assign leads individual Users.please share your thoughts
i'm given in lead custom picklist field i.e TimeZone.
timezone picklist values:EST AST CHST
checkbox Username EST AST CHST Total
checked test@test.com 1 2 1 4
grandTotal 4
In this class i got only total count of leads TimeZone picklist but i want individual count of picklist values count that means
i want EST,AST,CHST and GrandTotal cout.
VF page:
<apex:page standardController="Lead" extensions="IndividualLeadassign" sidebar="false">
<apex:form >
<apex:pageBlock title="Sales Reps">
<apex:inputCheckbox title="Select All" label="Select All" id="chkSelectAll" dir="RTL" onclick="checkAll(this)">
<apex:actionSupport rerender="Selected_PBS"/>
</apex:inputCheckbox>
<apex:pageBlockTable value="{!Summaries}" var="s">
<apex:column headerValue="SalesRep" value="{!s.OwnerId}"/>
<apex:column headerValue="EST"/>
<apex:column headerValue="CHST"/>
<apex:column headerValue="AST"/>
<apex:column headerValue="Total" value="{!s.Total}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
Extension Controller:
public class IndividualLeadassign {
public Lead Leadobj{get;set;}
Public List<User> SalesRepUsers;
public Summary[] Summaries { get; set; }
public IndividualLeadassign(ApexPages.StandardController controller)
{
Leadobj = new Lead();
SalesRepUsers=[select id,name from user where Profile.Name='Sales Representative'AND UserRole.Name='Sales Rep'];
AggregateResult[] results = [SELECT OwnerId,Count(Time_Zone__c) Total from Lead where ownerId IN:SalesRepUsers GROUP BY OwnerId];
Summaries = new List<Summary>();
for(AggregateResult ar : results)
{
Summaries.add(new Summary(ar));
}
public class Summary {
Public integer Total {get; private set;}
public String OwnerId { get; private set;}
//Public List<Lead> lstlead{get;set;}
public Summary(AggregateResult ar)
{
Total = (integer) ar.get('Total');
OwnerId= (String) ar.get('OwnerId');
}
}
}
please give me addition information about this task
help me