• Rajneesh Ranjan 23
  • NEWBIE
  • 130 Points
  • Member since 2015

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 22
    Replies
Based on the value of a picklist field I need to render a static message in a small VF page at the top of the record in Classic UI.  I have created an Apex controller as well as the VF page, but I have not been able to make this work.  I am new to this level of development so any assistance you might be able to give would be greatly appreciated.  Basically, if a picklist field called Frequency contains one of three different values, I want to display a static text message.  Below is the code I have written so far:

Apex Class – “ContentMessageInlineCtrl”
public with sharing class ContentMessageInlineCtrl {
  public Content__c cov {get;set;}
 
  public ContentMessageInlineCtrl(ApexPages.StandardController controller) {
    if(!Test.isRunningTest()) {
      controller.addFields(new List<String>{'Frequency__c'});
    }
        cov = (Content__c) controller.getRecord();
    }
}
 
VisualForce Page = “ContentMessageInline”
<apex:page standardController="Content__c" extensions="ContentMessageInlineCtrl">
    <style type="text/css">
        .redAlert {
            font-weight: bold;
            color: #FF0000;
            font-size : 22px;
            text-decoration: none;
        }
       
    </style>
   
    <apex:form >
        <apex:outputPanel rendered="{if(!(Frequency__c == “Weekly”||Frequency__c == “Semi Monthly (Twice a month)”||
        Frequency__c == “Bi Weekly (Every Other week)”)true,false)}">          
            <center>
               <apex:outputText styleClass="redAlert" value="THIS IS WHERE THE STATIC MESSAGE WILL RESIDE"/> <br/>
            </center>
        </apex:outputPanel>
    </apex:form>
</apex:page>
 
Hi!
I need to create a trigger that will populate a field with a value of other record of the same object. Here's the case:

I have a object called "timesheet__c" that contains an balance of hours worked for everybody in my company and we create new records every year to register new values. One of my fields calls "Last year balance" with the balance of hours of the previous year and i need that field to autopopulate everytime i create a new record in the object. How can i do this?

I have something like this, but is not working:
trigger SaldoAnterior on timesheet__c (before insert) {
    
        for(timesheet__c t : Trigger.New){
        List<timesheet__c> ts = [SELECT saldo_hora_ano_registro__c FROM timesheet__c WHERE colaborador__c = : t.colaborador__c AND ano_referencia__c = '2015'];
        t.saldo_ano_anterior__c = ts.saldo_hora_ano_registro__c; 
}
}
How we can identify if lightning web component (LWC) is running in Salesforce mobile app or in desktop browser?
I have created a lightning-datatable in LWC and added a custom column that display a URL. Now, I would like to add onclick event in the URL field and want to pass row information to the javascript method. The idea is to render the component markup that will display all the information about the item that was clicked (within the same lwc). Can anyone please help me on this, how I can add an onclick event in URL and hadnle the click event with a function in LWC datatable.
////// test.html
<div class="" style="height:420px">
	<lightning-datatable key-field="Id" 
		data={lstAllRows} 
		columns={columns}
		onrowaction={handleRowAction} 
		enable-infinite-loading
		load-more-offset={intLoadLabelOffset}
		onloadmore={handleLoadMoreData}
		hide-checkbox-column>
	</lightning-datatable>
</div>

////// test.js
getRequiredList(){
	getTabelData({
		strName: this.strName
		}).then(response =>{
			this.lstTmp = response.lstExistingData;
			this.lstTmp.forEach(function(record){
				record.linkName = '/lightning/r/'+record.Id+'/view'; 
			});
			this.lstAllRows = this.lstTmp;
		}).catch(error =>{
				this.strRecordErrorMessage = error.body.message;
				console.log('Error in getting the accounts', this.strRecordErrorMessage);
			})
}		

this.columns = [
{ label: this.label.labelTableHeaderNAME, fieldName: 'linkName', type: 'url', 
	typeAttributes: {label: { fieldName: 'Name' }, target: '' },
	cellAttributes: { } 
}]
Where I am adding url: 
record.linkName = '/lightning/r/'+record.Id+'/view';
I would like to add onclick event here and stop the url redirect behaviour. Any click on the URL should not redirect user to the new page, instead of that, a piece of markup should render the record details on the same lwc.

Regards,
Rajneesh
Hi,

I am trying to display a lightning-datatable with few columns in lightning web component. As I get the data from apex, I try to add new column in the JS controller dynamically with hyperlink (as we did in aura component), but it does not allow me to add this new column.

Aura Component
component.set('v.mycolumns', [
            {label: 'Account Name', fieldName: 'linkName', type: 'url', 
            typeAttributes: {label: { fieldName: 'Name' }, target: '_blank'}},
            {label: 'Industry', fieldName: 'Industry', type: 'text'},
            {label: 'Type', fieldName: 'Type', type: 'Text'}
        ]);
 
action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                var records =response.getReturnValue();
                records.forEach(function(record){
                    record.linkName = '/'+record.Id;
                });
                component.set("v.acctList", records);
            }
        });

I am trying to do similar implementation in LWC but no luck. Can someone please help me on this.

Thanks.
Is it possible to create a MAP<Field1, Field2> directly using SOQL [SELECT Field1, Field2 from Obj_Test] without iterating over LIST returned by SOQL.

For example, if I have an Employee object and want to create a MAP<Emp_Id, Emp_Salary> by using SOQL- SELECT Emp_Id, Emp_Salary FROM Employee__c; I know we can achieve it by using for loop over List returned by SOQL and put these two fields in a map.

Can anyone please let me know if is there another way to do this?

Thanks,
Rajneesh
Can any one please explain, why we use "Static Resource" in VF Markup to display images and to link other elements like CSS and JS files. Why we do not place these components in "Document" folder and use it on a VF page. What all advantages are there if we use Static Resource.

Thanks in advance..!!

Regards,
Rajneesh
How we can identify if lightning web component (LWC) is running in Salesforce mobile app or in desktop browser?
Hi,

I am trying to display a lightning-datatable with few columns in lightning web component. As I get the data from apex, I try to add new column in the JS controller dynamically with hyperlink (as we did in aura component), but it does not allow me to add this new column.

Aura Component
component.set('v.mycolumns', [
            {label: 'Account Name', fieldName: 'linkName', type: 'url', 
            typeAttributes: {label: { fieldName: 'Name' }, target: '_blank'}},
            {label: 'Industry', fieldName: 'Industry', type: 'text'},
            {label: 'Type', fieldName: 'Type', type: 'Text'}
        ]);
 
action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                var records =response.getReturnValue();
                records.forEach(function(record){
                    record.linkName = '/'+record.Id;
                });
                component.set("v.acctList", records);
            }
        });

I am trying to do similar implementation in LWC but no luck. Can someone please help me on this.

Thanks.
Hi Guys,

I am trying achieve 100 % test class coverage , but somehow I am not able to achieve.

Could you please help me here..!!

Trigger Code : 

trigger DuplicateStudent on Student__c (before insert) {
       //Get all Student__c related to the incoming Student records in a single SOQL query.
       Student__c[] studentsList = Trigger.new;
       Set<String> emailSet = new Set<String>();
       for(Student__c s : studentsList){
        emailSet.add(s.Email__c);
       }
       //Get list of duplicate Students
       List<Student__c> duplicateStudentList = [Select s.Name, s.Email__c From Student__c s where s.Email__c IN :emailSet];
       Set<ID> duplicateEmailIds = new Set<ID>();
       for(Student__c s : duplicateStudentList){
        duplicateEmailIds.add(s.Email__c);
       }
       for(Student__c s : studentsList){
            if(duplicateEmailIds.contains(s.Email__c))              {
                s.Email__c.addError('Record already exist with same email Id');
            }
       }
}

Test ClasS : 

@isTest
private class DuplicateStudentTrigger_Test {
    
    
         static testMethod void myUnitTest() {
        Account acc = new Account();
        acc.Name = 'SFDC';       
        insert acc;

        Student__c s = new Student__c();
        s.Name = 'Om Test';
        s.Email__c = 'admin@JitendraZaa.com';
        s.Account_Name__c=acc.ID;
        
                   
        try
        {
            insert s;
        }
        catch(System.DMLException e)
        {
            System.assert(e.getMessage().contains('Record already exist with same email Id'));
        }
    }
}
Based on the value of a picklist field I need to render a static message in a small VF page at the top of the record in Classic UI.  I have created an Apex controller as well as the VF page, but I have not been able to make this work.  I am new to this level of development so any assistance you might be able to give would be greatly appreciated.  Basically, if a picklist field called Frequency contains one of three different values, I want to display a static text message.  Below is the code I have written so far:

Apex Class – “ContentMessageInlineCtrl”
public with sharing class ContentMessageInlineCtrl {
  public Content__c cov {get;set;}
 
  public ContentMessageInlineCtrl(ApexPages.StandardController controller) {
    if(!Test.isRunningTest()) {
      controller.addFields(new List<String>{'Frequency__c'});
    }
        cov = (Content__c) controller.getRecord();
    }
}
 
VisualForce Page = “ContentMessageInline”
<apex:page standardController="Content__c" extensions="ContentMessageInlineCtrl">
    <style type="text/css">
        .redAlert {
            font-weight: bold;
            color: #FF0000;
            font-size : 22px;
            text-decoration: none;
        }
       
    </style>
   
    <apex:form >
        <apex:outputPanel rendered="{if(!(Frequency__c == “Weekly”||Frequency__c == “Semi Monthly (Twice a month)”||
        Frequency__c == “Bi Weekly (Every Other week)”)true,false)}">          
            <center>
               <apex:outputText styleClass="redAlert" value="THIS IS WHERE THE STATIC MESSAGE WILL RESIDE"/> <br/>
            </center>
        </apex:outputPanel>
    </apex:form>
</apex:page>
 
I need help on creating test class for the below class. I have written test class but which is covering only 5%. Please help us to get 80% code coverage.

public class ccweb{
public String cn{get; set;}
public Case cc{get;set;}
public Case c{get;set;}
private final Case mycase;
    public ccweb() {
    
      
    }
    public Case getCase() {
        return mycase;
    }
public ccweb(apexpages.StandardController controller){
 
      this.cc = (Case)controller.getRecord();
      cn = ApexPages.currentPage().getParameters().get('cn');
      mycase = [Select id,caseNumber from Case where caseNumber=:cn];
  }
 
    public PageReference save() {
       
        update mycase;
        return page.ThankyouPage;
    }
 
}
 
Hello Everyone,

I was working on Parsing Excel File by Apex but unfortunately i was not able to get specific row and specific column value. By using Parsing, i was able to fetch  all of the columns but i wanted to get specific row also. Below is the code which I've used for Columns:
         string  csvAsString = csvFileBody.toString();
           String[] csvFileLines = csvAsString.split('\n');             
           for(Integer i=1;i<csvFileLines.size();i++){
               Contact accObj = new Contact() ;
               string[] csvRecordData = csvFileLines[i].split(','); //In this i was able to fetch Columns, from this i wanted to get Row Value
           }    
 Help me on getting the specific Row&Column value from an excel.
Thanks in advance!!!              
hello i need your help!
i need to have a field in opportunity that copy in it  the email from the contact 
1- Diff. between controller and Apex class?

2- any specific reason to use custome controller?


Can anyone help to understand these two concepts?

Thanks!
Hello friends!

I need your assistance asap. I am trying to write a workflow rule (or trigger, or process flow,etc.).

I need a workflow that recognizes a change in a field on a Customer Account record and depending on the change, updates the account type to Prospect.

The scenario is this:

1.) There is a nightly batch job that runs and feeds 3 fields on the account record with a number. There is also a formula field that sums these 3 fields called Total Fleet#. This field is the one I will be using for this scenario.
2.) Before the batch job runs, there is another job that zeroes out the fields. So the Fleet Total# before job = 7, Fleet Total# after job = 0.
3.) The next batch job then fills in the values again.
4.) If the new values equal 0 after the batch job and had a non-zero value originally, we need the workflow to update the account type to Prospect.

So basically, when the fleet total field is 0, the account is a prospect. 

The problem is that all of the accounts will turn to 0 because of the first batch job. So I need a way to flag these accounts and have the workflow kicks in AFTER the second batch job.

I hope you can follow this! If not, let me know and I will try to explain in another way.

Thanks so much for your help!

Shannon
 
Hello,
i'm new to VF. I try to add a VF block in the standard Lead Layout.
I have created new custom fields and they ONLY show in the VF block if they are also placed in the standard Lead Layout.
I want them to only appear on the VF block because i want to arrange them in certain way that is not possible with std. Laad Layout.
Any pointers how to have them only in VF?
Hi All - thanks in advance for the help.

I have a set of custom fields on a custom object - called "Benefits" - to track codes which people use to register for a conference. "Benefits" custom object lives on the campaign. 

I want to create a formula field on the "Benefits" object called "Codes Used" which counts the number of campaign members who have the <<Member Status>> = "Registered" and <<Discount Code>> = <<code on the benefit object>>.

Possible? Easy to set-up? What kind of code would be required? 

Thanks so much!
Hi!
I need to create a trigger that will populate a field with a value of other record of the same object. Here's the case:

I have a object called "timesheet__c" that contains an balance of hours worked for everybody in my company and we create new records every year to register new values. One of my fields calls "Last year balance" with the balance of hours of the previous year and i need that field to autopopulate everytime i create a new record in the object. How can i do this?

I have something like this, but is not working:
trigger SaldoAnterior on timesheet__c (before insert) {
    
        for(timesheet__c t : Trigger.New){
        List<timesheet__c> ts = [SELECT saldo_hora_ano_registro__c FROM timesheet__c WHERE colaborador__c = : t.colaborador__c AND ano_referencia__c = '2015'];
        t.saldo_ano_anterior__c = ts.saldo_hora_ano_registro__c; 
}
}
Hi

My requirement is when i click on first radio button 5 fields tto be displayed
when i click on the another radio button other fields to  bedisplayed
can Someone help me

public class sectiondisplay
{
public Account acc{get;set;}
public string atop{get;set;}
public boolean ename{get;set;}
public sectiondisplay(Apexpages.standardcontroller controller)
{
atop='company';
acc.search__c=atop;
}
public void m1()
{
ename=true;
}
public List<Selectoption> getvalues()
{
List<Selectoption> optionvalues = new List<selectoption>();

optionvalues.add(new Selectoption('Company', 'company'));
optionvalues.add(new selectoption('talent','talent'));
return optionvalues;
}
}
<apex:page standardcontroller="Account" extensions="sectiondisplay">
<apex:form >
<apex:selectradio value="{!atop}">
<apex:selectoptions value="{!values}"/>
<apex:actionsupport event="onchange" action="{!m1}" rerender="cpblock"/>
</apex:selectradio>
<apex:pageblock id="cpblock">
<apex:pageblocksection title="details">
<apex:inputfield value="{!Account.type}" rendered="{!ename}"/>
</apex:pageblocksection>
</apex:pageblock>
</apex:form>
</apex:page>
Thanks & Regards,
Sindhu Ambarkar.
Any idea on how to display two tables on a vf page and compare each row of the two tables and display the output as matched or not matched on click of a button ?In the second table there should be a flag column that should be updated with true or false if any of the rows from two table match..
Can any one please explain, why we use "Static Resource" in VF Markup to display images and to link other elements like CSS and JS files. Why we do not place these components in "Document" folder and use it on a VF page. What all advantages are there if we use Static Resource.

Thanks in advance..!!

Regards,
Rajneesh
Hi everybody, I've been having a tricky time getting this query to work. I'm trying to get all the data from Contact, and also, the AccountName that the Contact is ascociated with.

This query works great, but doesn't give me the AccountName of course. I'm hoping somebody could shed some light on how to add in the AccountName portion via a relationship query.

Here's my current, working query:

SELECT Contact.Name, Contact.FirstName, Contact.LastName, Contact.Id, Contact.Phone,Contact.Title, Contact.Department, Contact.PhotoUrl, Contact.Email, Contact.MailingCity, Contact.MailingState, Contact.MailingCountry, Contact.MailingPostalCode, Contact.MailingStreet LIMIT 100

Thank you
 
Hi,
Based on change in the picklist value the value should be displayed in outputtext in visualforce page.Can someone help with the sample code for the actionsupport or actionfunction for onchange event.

Thanks & Regards,
Sindhu Ambarkar.
My Controller:
global class AR_RepWorkingReport {
        //public Map<ID,User> reps;
        //
        //
        //DeclinedLeads: Invoice Status='Lead Refunded'
        //AcceptedLeads: Invoice Status='Lead Sold/Charged'
    public List<User> repsList;
    public String selectedRep{get;set;}
    public String startdate{get;set;}
    public String enddate{get;set;}
    public repstats statistics{get;set;}
    public List<clients> clientscount{get;set;}
    public List<PieWedgeData> ActivitiesPieData{get;set;}
    public List<PieWedgeData> ClientsPieData{get;set;}
    public boolean renderPie{get;set;}
    public AR_RepWorkingReport()
    {
        repsList=[select ID,Name from User where isActive=true and type_rep__c in ('Junior','Senior') order by Name ];
        statistics=new repstats();
        clientscount =new  List<clients>();  
        ActivitiesPieData=new List<PieWedgeData>();
        ClientsPieData=new List<PieWedgeData>();
        renderPie=false;
    }
    public List<PieWedgeData> getAcPieData()
    {
        return ActivitiesPieData;
    }
    public List<PieWedgeData> getclPieData()
    {
        return ClientsPieData;
    }
    public class PieWedgeData {
        public String name { get; set; }
        public Integer data { get; set; }
        public PieWedgeData(String name, Integer data) {
            this.name = name;
            this.data = data;
        }
    }
     public void getClientsPieData() {
        ClientsPieData = new List<PieWedgeData>();
        //List<PieWedgeData> clientsPie = new List<PieWedgeData>();
                For(clients c : clientscount)
        {
            if(Integer.valueOf(c.count)!=0){
                String chartclientName=c.Name==null?'None':C.name;
                ClientsPieData.add(new PieWedgeData(chartclientName, Integer.valueOf(c.count)));}
        }
    } 
    
    
    public void getActivitiesPieData() {
        ActivitiesPieData = new List<PieWedgeData>();
        //List<PieWedgeData> clientsPie = new List<PieWedgeData>();
        if(Integer.valueOf(statistics.voiceMail)!=0){
        ActivitiesPieData.add(new PieWedgeData('Voice Mail', Integer.valueOf(statistics.voiceMail)));
        }
        if(Integer.valueOf(statistics.ConversationCSuite)!=0){
        ActivitiesPieData.add(new PieWedgeData('Conversation with C Suite', Integer.valueOf(statistics.ConversationCSuite)));
        }
        if(Integer.valueOf(statistics.ConversationHR)!=0){
        ActivitiesPieData.add(new PieWedgeData('Conversation with HR', Integer.valueOf(statistics.ConversationHR)));
        }
        if(Integer.valueOf(statistics.ConversationOther)!=0){
        ActivitiesPieData.add(new PieWedgeData('Conversation - Other', Integer.valueOf(statistics.ConversationOther)));
        }
        if(Integer.valueOf(statistics.NML)!=0){
        ActivitiesPieData.add(new PieWedgeData('No Message Left', Integer.valueOf(statistics.NML)));
        }
        if(Integer.valueOf(statistics.FollowUpReminder)!=0){
        ActivitiesPieData.add(new PieWedgeData('Follow Up Reminder', Integer.valueOf(statistics.FollowUpReminder)));
        }
        if(Integer.valueOf(statistics.AcceptedLeads)!=0){
         ActivitiesPieData.add(new PieWedgeData('Accepted Leads', Integer.valueOf(statistics.AcceptedLeads)));
        }
        if(Integer.valueOf(statistics.DeclinedLeads)!=0){
         ActivitiesPieData.add(new PieWedgeData('Declined Leads', Integer.valueOf(statistics.DeclinedLeads)));
        }
        if(Integer.valueOf(statistics.RFI)!=0){
         ActivitiesPieData.add(new PieWedgeData('RFI', Integer.valueOf(statistics.RFI)));
        }
    } 
    /*
    public void getActivitiesPieData() {
        ActivitiesPieData = new List<PieWedgeData>();
        //List<PieWedgeData> clientsPie = new List<PieWedgeData>();
        ActivitiesPieData.add(new PieWedgeData('Voice Mail', 1));
        ActivitiesPieData.add(new PieWedgeData('Conversation with C Suite',2));
        ActivitiesPieData.add(new PieWedgeData('Conversation with HR', 3));
        ActivitiesPieData.add(new PieWedgeData('Conversation - Other',4));
        ActivitiesPieData.add(new PieWedgeData('No Message Left',5));
        ActivitiesPieData.add(new PieWedgeData('Follow Up Reminder', 6));
         ActivitiesPieData.add(new PieWedgeData('Accepted Leads', 7));
         ActivitiesPieData.add(new PieWedgeData('Declined Leads', 8));
         ActivitiesPieData.add(new PieWedgeData('RFI', 9));
    } */
    
    
    
    public void fetchRepBehaviors()
    {
        
        statistics=new repstats(); 
        clientscount =new  List<clients>();
        Map<String,integer> clientsmp=new Map<String,integer>();
        if(startdate!=null&&enddate!=null&&selectedRep!=null){
            Date statsstart=date.parse(startdate);
            Date statsend=date.parse(enddate);
            
            List<Task> repTasks=[select CallType__c,Contact_Type__c,whatId from Task where OwnerId=:selectedRep and createddate>=:statsstart and createddate<=:statsend];
            //IDs of Prospects
            List<ID> whatids=new LIst<ID>();
            List<Opportunity> repopps=[select Opportunity_Type__c,Opportunity_stage__c,Invoice_Status__c from Opportunity where (OwnerId=:selectedRep or Lead_sharing__c=:selectedRep) and createddate>=:statsstart and createddate<=:statsend];
           
            statistics.totalActivities=repTasks.size();
            System.debug('Number of Tasks: '+repTasks.size());
            for(Task t : repTasks)
            {
                if(t.CallType__c=='Conversation'){
                    if(t.Contact_Type__c=='Other'){statistics.ConversationOther++;}
                    else if(t.Contact_Type__c=='HR'){statistics.ConversationHR++;}
                    else if(t.Contact_Type__c=='C-Suite'){statistics.ConversationCSuite++;}
                }
                else if(t.CallType__c=='Left Voicemail'){
                    statistics.voiceMail++;
                }
                else if(t.CallType__c=='NML'){
                    statistics.NML++;
                }
                else if(t.CallType__c=='Follow up reminder'){
                    statistics.FollowUpReminder++;
                }
                whatids.add(t.whatid);
            }
            List<Account> prospects=[select Name,client_territories__c from Account where ID in :whatids];
            For(Account a: prospects)
            {
                if(clientsmp.containsKey(a.client_territories__c)){
                    Integer num=clientsmp.get(a.client_territories__c)+1;
                    clientsmp.put(a.client_territories__c, num);
                }
                else {
                    clientsmp.put(a.client_territories__c, 1);
                }
            }            
            For(String acctname : clientsmp.keySet()){
                clients c=new clients();
                c.count=clientsmp.get(acctname);
                c.name=acctname;
                clientscount.add(c);
            }
            
            For(Opportunity o : repopps){
                if(o.Opportunity_Type__c=='RFI'){
                    statistics.RFI++;
                }
                else if(o.Opportunity_Type__c=='Lead'){
                    if(o.Invoice_Status__c=='Lead Sold/Charged'){
                        statistics.AcceptedLeads++;
                    }
                    else if(o.Invoice_Status__c=='Lead Refunded'){
                        statistics.DeclinedLeads++;
                    }
                }
            }
            
        }
        renderPie=true;
        getActivitiesPieData();
        System.debug(ActivitiesPieData);
        getClientsPieData();
        System.debug(ClientsPieData);
    }
    

    
    //get the reps' names for the dropdown list
    public List<SelectOption> getReps(){
        List<SelectOption> options=new List<SelectOption>();
        for(User u : repsList){
            options.add(new SelectOption(u.id,u.name));
        }
        return options;
    }
    
    public class repstats
    {
        public repstats()
        {
            totalActivities=0;voiceMail=0;ConversationCSuite=0;ConversationHR=0;ConversationOther=0;AcceptedLeads=0;
            RFI=0;NML=0;FollowUpReminder=0;DeclinedLeads=0;
        }
        public integer totalActivities{get;set;}
        public integer voiceMail{get;set;}
        public integer ConversationCSuite{get;set;}
        public integer ConversationHR{get;set;}
        public integer ConversationOther{get;set;}
        public integer AcceptedLeads{get;set;}
        public integer RFI{get;set;}
        public integer NML{get;set;}
        public integer FollowUpReminder{get;set;}
        public integer DeclinedLeads{get;set;}
        
    }
    public class clients{
        public String Name{get;set;}
        public integer count{get;set;}
        public String ID{get;set;}        
    }
    
    
    
}

My VF Page:
<apex:page controller="AR_RepWorkingReport" showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script>
    var startdate,enddate;
    $(document).ready(function(){
        $("#arstart").datepicker({
        onSelect:function(dateText,inst){
            startdate=$(this).val();
            if(typeof enddate!=='undefined'){
                callActionMethod();
            }
        }}); 
        $("#arend").datepicker({
        onSelect:function(dateText,inst){
            enddate=$(this).val();
            if(typeof startdate!=='undefined'){
                callActionMethod();
            }
        }});    
    });
</script>
<script>
    function callActionMethod()
    {
        echo(startdate,enddate);
    }
</script>

<style type="text/css">
.pointer
{
    cursor:pointer;
    border:1px solid #ccc;
    padding: 5px;
}
</style>

</head>
<body>
    <div class="container">
        <div class="row well">
        <apex:form >  
            <div class="col-sm-2">         
                <apex:selectList value="{!selectedRep}" styleClass="form-control" size="1">           
                    <apex:selectOptions value="{!Reps}"></apex:selectOptions>
                    <apex:actionSupport event="onchange" reRender="resultPanel" action="{!fetchRepBehaviors}" status="myStatus"/>
                </apex:selectList>           
            </div>       
            <div style="float:left;">From:</div>
            <div class="col-sm-2 form-search">                        
                <input id="arstart"/>
            </div>
            <div style="float:left;">To:</div>
            <div class="col-sm-2">
                <input id="arend" />
            </div> 
         <apex:actionfunction name="echo" action="{!fetchRepBehaviors}" reRender="resultPanel" status="myStatus">
            <apex:param name="startdate" assignTo="{!startdate}" value=""/>
            <apex:param name="enddate" assignTo="{!enddate}" value=""/>    
        </apex:actionFunction>
        </apex:form>  
    </div>
</div>
<apex:outputPanel id="resultPanel">
        <apex:actionstatus startText="Requesting..." stopText="" id="myStatus" styleclass="hassuccess"/>
    <div class="container">
        <div class="row">
            <div class="col-md-3">    
                <table class="table  table-hover">
                    <tr>
                    <td style="color:orange"><apex:outputLabel value="Activity Type"/></td>
                    <td style="color:orange"><apex:outputLabel value="Count"/></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Voice Mail"/></td>
                    <td><apex:outputText value="{!statistics.voiceMail}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Conversation with C Suite"/></td>
                    <td><apex:outputText value="{!statistics.ConversationCSuite}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Conversation with HR"/></td>
                    <td><apex:outputText value="{!statistics.ConversationHR}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Conversation - Other"/></td>
                    <td><apex:outputText value="{!statistics.ConversationOther}"></apex:outputText></td>
                    </tr>                
                    <tr>
                    <td><apex:outputLabel value="No Message Left"/></td>
                    <td><apex:outputText value="{!statistics.NML}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Follow Up Reminder"/></td>    
                    <td><apex:outputText value="{!statistics.FollowUpReminder}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><b><apex:outputLabel value="Total Activities" style="color:red;"/></b></td>    
                    <td><apex:outputText value="{!statistics.totalActivities}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Accepted Leads"/></td>
                    <td><apex:outputText value="{!statistics.AcceptedLeads}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="Declined Leads"/></td>
                    <td><apex:outputText value="{!statistics.DeclinedLeads}"></apex:outputText></td>
                    </tr>
                    <tr>
                    <td><apex:outputLabel value="RFI"/></td>
                    <td><apex:outputText value="{!statistics.RFI}"></apex:outputText></td>
                    </tr>
                </table>    
            </div>
  
        <div class="col-md-5">    
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th style="color:orange">Client Territory</th>
                        <th style="color:orange">Count</th>
                    </tr>
                </thead>
                <tbody>
                    <apex:repeat value="{!clientscount}" var="List">
                    <tr>
                        <td><apex:outputLabel value="{!List.Name}"></apex:outputLabel></td>
                          <td><apex:outputLabel value="{!List.count}"></apex:outputLabel></td>
                    </tr>
                    </apex:repeat>
                </tbody>
            </table>
         </div>  
       </div>
    </div>
    
<div>
            <apex:chart height="350" width="450" data="{!AcPieData}" rendered="{!renderPie}">
                <apex:pieSeries dataField="data" labelField="name"/>
                <apex:legend position="right"/>
            </apex:chart>  
            </div>
            <div>

</div>
</apex:outputPanel>
         <div class="navbar navbar-default navbar-fixed-bottom">
    <div class="container">
        <p class="navbar-text pull-left">Site Built by Jack Wang, Dallas TX, 2014</p>
        <a class="navbar-btn btn-info btn pull-right" href="mailto:jack.wang@accelerationretirement.com">Contact Me</a> 
    </div>  
    </div>



</body>
</html>
</apex:page>

The JS Debug Log:
User-added image

User-added image