• MS123456
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 6
    Replies

Automate Process 2 - for 'Open' leads with no activity for 2 weeks, send an automated follow-up message.

Automated Process 4 - for Inactive leads / contacts without activity for 4 months, send a keep in touch email.

Acitivity means Task and Event


How to solve please help me out.
Hi team,
 Please review the below case... it's urgent.
We install Survey Force App in Configure complete. but below issue facing
I am facing an issue, not able to open the post chat page url on an external website. 
1. Create a force.com site for Survey force Vf page.
2.use this Site and "Survey Id" for the Post chat url in live Agent Chat button Configuration.
3.When i am test snap ins page after Completed the chat click on the Give feedback form, but its not working.
Please Guide us.
Thanks



 Use Case:
whenever a new transaction is perforned successfully then update the customer object balance field based on --
if transaction type= deposit,
then balance = balance+amount;

if transaction type= withdraw,
then balance = balance-amount; 
 
 Note- Customer and Transaction have lookup detail relationship
Hi Team Pls Help me is bulkify Or not Test Class........
@isTest 
public class eventTriggerContactTest 
{
    static testMethod void testMostRecentUpdation() 
    {
        Contact objContact = new Contact();
        objContact.LastName = 'TestCon';
        objContact.FirstName = 'TestCon';
        insert objContact;
        
        Event objEvent = new Event();
        
        for(Integer i=0;i<=200; i++)
        {
        objEvent.Type = 'Consult';
        objEvent.Description = 'Test Desc'; 
        objEvent.whoId = objContact.Id;
        objEvent.Meeting_Type__c='Phone';
        objEvent.Event_Status__c='Completed';
        objEvent.Phone_Call_Type__c='Inbound';
        objEvent.StartDateTime = System.today();
        objEvent.EndDateTime = System.today();
        objEvent.Subject  = 'Test Event';
        }
        
        
        insert objEvent;
        
        System.assertEquals(objEvent.Id, [SELECT Most_Recent_Event_Id__c FROM Contact WHERE Id =: objContact.Id].Most_Recent_Event_Id__c);
        
        Event objEvent2 = new Event();
        
        for(Integer i=0;i<=200;i++)
        {
        objEvent2.Type = 'Consult';
        objEvent2.Description = 'Test Desc';
        objEvent2.Meeting_Type__c='Phone';
        objEvent2.Event_Status__c='Completed';
        objEvent2.Phone_Call_Type__c='Inbound';
        objEvent2.whoId = objContact.Id;
        objEvent2.StartDateTime = System.today();
        objEvent2.EndDateTime = System.today();
        objEvent2.Subject  = 'Test Event';
        }
      
        insert objEvent2;
        System.assertEquals(objEvent2.Id, [SELECT Most_Recent_Event_Id__c FROM Contact WHERE Id =: objContact.Id].Most_Recent_Event_Id__c);
        
        update objEvent;
    }
    
}
hi Nayana K...

 
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}

 
Hi Team pls Help me its Very Urgent..................
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}

Pls Help Me its Very Very Urgent..........
Requirment is: if event is insert then contact will updated some field and if some chenges insterted event the contact will also updated n mos recent event id will be this contact .
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}

Hi Team, I need help very very Urgent.....
Event is object and the Type='Consult'(picklist value)

If I have created the event automatically contact randomly assign to any contact.

But this contact most recently event field updated to this contact filed  below field is on event object they are formula(text) and contact are text data type pls how to achieve this requirement .....

+++++++++++This  is my code ++++++

trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   list<Contact> conList = new List<Contact>();
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,Department,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,
                                               User_Office_Website__c from contact where Id IN:set_ContactId]);
                                               
                                               
        
        for(Event e : Trigger.new)
          {
            List<Event> e1 = new List<Event>([Select Id,whoId,StartDateTime,Start_Time__c from event where Id =:e.id]);
            system.debug('@@@@@@'+ e1);
            if(conMap!=null && conMap.containsKey(e1[0].whoId))
              
              {
                   
                   conMap.get(e1[0].whoId).StartDateTime__c= e1[0].StartDateTime;
                   conMap.get(e1[0].whoId).Start_Time__c= e1[0].Start_Time__c;
                   conList.add(conMap.values());
              }
          }
          
          
          
          system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
          
          
  }        
                                                        

}
Hi Team Pls Help me....

Use Case:update below fields from the Most Recent Event corresponding to a contact with type="Call" to the Contact objects in Salesforce 

Below are the fields which we are going to automate :
1.IsPrivate
2.StartDateTime     
3.Subject

Only Using Trigger......

Hey, team I am facing some issue WHile Updating Accouunts Notes in My Vf page. please advice .


Visualforce Page

 

Case

ABC Firms wants a custom UI which has ability for them to view Account with account notes on one screen. They wish to create/update multiple account notes simultaneously.

Requirement Details

  • Create a custom object Account notes with Account as parent.
  • Set name field as auto-number and a custom field ‘Notes’ of text area type.
  • Create a custom VF tab, ‘Note Update’.
  • VF Page should have capability of pagination and text provided by user should maintain its state throughout pagination.
  • While pagination a loading image should be displayed for user to wait till operation completes.
  • VF Page should display – Account Number(Read Only), Account Name(Read Only), Account Notes (Notes field of related object in editable mode)
  • Against one account only one account notes will be shown (hence pull the most recent record)
  • User will have the ability to create new note if Note field is blank
  • If note field has some existing value, user will have ability to update it
  • Save button should help user in saving all the changes made by him.
  • You are free to decide on Pages Look and Feel
  • Adhere to salesforce best practices.
  • Create test class to ensure developed code can be deployed; adhere to best practices of testing framework
global class AccountWrapper {
    public String Name{get;set;}
    public String accountNumber{get;set;}
    public Account account{get;set;}
    public List<Account_Note__c> accountNote{get;set;}
    
    public AccountWrapper (String accName,String accNumber,List<Account_Note__c> Acc_Note)
    {
        this.Name = accName;
        this.accountNumber = accNumber;
        this.accountNote = Acc_Note;
        
        for(Account_Note__c accNote : accountNote)
        {
            if(accNote==null)
                accNote = new Account_Note__c();
        }
        
    }
    
    public AccountWrapper(){
        account = new Account();
    }
    public Pagereference save(){
        
        return null;
    }
}
 
==========================Controller=====================

public class AccountWrapperController{
    public List<AccountWrapper> lstWrapper{get; set;}
    public List<Account_Note__c> lstSetController{get; set;}
    public List<account> acc_Lst{get;set;}
    
    public ApexPages.StandardSetController con {
        get {
            if(con == null) {
                con = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT Name,AccountNumber,(SELECT Id, Notes__c FROM Account_Notes__r ORDER BY CreatedDate DESC limit 1) FROM Account])); 
                //here you can set the record size to display                
                con.setPageSize(10);       
            }
            return con;
        }
        set;
    } 
    public List<Account> getAccounts() {
        return (List<Account>) Con.getRecords();
    }
    
    /*****************Creating the constructor***********************/ 
    
    
    public AccountWrapperController() {
        lstWrapper =  new List<AccountWrapper>();
        lstSetController = new List<Account_Note__c>();
        try{ 
            for(Account acc : ([SELECT Name,AccountNumber,(SELECT Id, Notes__c FROM Account_Notes__r ORDER BY CreatedDate DESC limit 1) FROM Account])){
                lstWrapper.add(new AccountWrapper(acc.Name,acc.AccountNumber,acc.Account_Notes__r));
            }
            
        }
        catch(SObjectException se) {
            System.debug('The following exception has occurred: ' + se.getMessage());
        }
        /*  obj = new CustomIterable (lstWrapper); 
obj.setPageSize = 10;
next();   */     
    }
    
    /*********************pagination methods*********************/  
    
    public Boolean hasNext {
        get {
            return con.getHasNext();
        }
        set;
    }
    
    public Boolean hasPrevious {
        get {
            return con.getHasPrevious();
        }
        set;
    }
    
    public Integer pageNumber {
        get {
            return con.getPageNumber();
        }
        set;
    }
    
    public void first() {
        con.first();
    }
    
    public void last() {
        con.last();
    }
    
    public void previous() {
        con.previous();
    }
    
    public void next() {
        con.next();
    }
    
    public void cancel() {
        con.cancel();
    }  
    
    
    
    
    /*************************Update Method**********************/   
    public void UpdateNotes() {
        try{
            account_note__c an = new account_note__c();
            for(AccountWrapper AccWrap : lstwrapper){
                for(Account_Note__c Acnt_Note : AccWrap.AccountNote){
                    // upsert Acnt_Note;
                    lstSetController.add(Acnt_Note);
                }
                if(lstSetController.size()>0)
                {
                    upsert lstSetController;
                }
            }
        }
        
        catch(DmlException e) {
            System.debug('DmlException caught: ' + e.getMessage()); 
        }
    }
    public void processAjaxRequest(){  
        //Do some processing here  
        for(Integer i =0 ; i < 10000; i++){  
        }  
    }  
}
 
====================VF page=========================

<apex:page controller="AccountWrapperController" >
    <apex:form >
        <apex:pageBlock id="myPage" mode="edit" >
            
            <apex:pageBlockButtons location="both">
                <apex:commandButton id="update" action="{!UpdateNotes}" value="Save" reRender="myPage" status="actStatusId"/>
                <apex:actionStatus id="actStatusId" >
                    <apex:facet name="start" >
                        <img src="/img/loading.gif" />                    
                    </apex:facet>
                </apex:actionStatus>
            </apex:pageBlockButtons>
            
            <apex:pageBlockSection columns="1">
                
                <apex:pageBlockTable value="{!Accounts}" var="acc" >
                    
                    <apex:column >
                        <apex:facet name="header">Account Name</apex:facet>
                        <apex:outputtext value="{!acc.Name}"/>
                    </apex:column>
                    
                    <apex:column >
                        <apex:facet name="header">Account Number</apex:facet>
                        <apex:outputtext value="{!acc.AccountNumber}"/>
                    </apex:column>
                    <apex:inlineEditSupport showOnEdit="update, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/> 
                    
                    <apex:column >
                        <apex:facet name="header">Account Notes</apex:facet>            
                        <apex:repeat value="{!acc.Account_Notes__r }" var="note">
                            
                            <apex:inputText value="{!note.Notes__c}"/>
                            
                        </apex:repeat>
                    </apex:column>  
                    
                </apex:pageBlockTable>
                
                
                <apex:outputPanel >
                    <apex:commandButton value="<<Previous" action="{!previous}" rendered="{!hasPrevious}" reRender="myPage" status="blockUI" />
                    
                    <apex:commandButton value="Next >>" action="{!next}" rendered="{!hasNext}" reRender="myPage"  status="NextStatusId"  />
                    <apex:actionStatus id="NextStatusId" >
                        <apex:facet name="start" >
                            <img src="/img/loading.gif" />                    
                        </apex:facet>
                    </apex:actionStatus>
                </apex:outputPanel>  
            </apex:pageBlockSection>
            
        </apex:pageBlock>
    </apex:form>
    
</apex:page>



 
Hi All,

I am looking for an example code for one of my requirements. 
I need to provide search filter options for all columns of a data table. 
I found a very suitable UI as well - but it is written in Java script and JQuery which I am not well versed in. 
I am posting screenshot and link to that example as well. 
If someone can help me with translated code which works in lwc or if you have any further suggestions please let me know. 
https://datatables.net/examples/api/multi_filter.html
DataTable with column filter option


thanks
Karthik
Hi team,
 Please review the below case... it's urgent.
We install Survey Force App in Configure complete. but below issue facing
I am facing an issue, not able to open the post chat page url on an external website. 
1. Create a force.com site for Survey force Vf page.
2.use this Site and "Survey Id" for the Post chat url in live Agent Chat button Configuration.
3.When i am test snap ins page after Completed the chat click on the Give feedback form, but its not working.
Please Guide us.
Thanks
hi Nayana K...

 
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}

 
Hi Team pls Help me its Very Urgent..................
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}

Pls Help Me its Very Very Urgent..........
Requirment is: if event is insert then contact will updated some field and if some chenges insterted event the contact will also updated n mos recent event id will be this contact .
trigger eventTriggerContact on Event (after insert, after update) {

   Set<Id> set_ContactId = new Set<Id>();
   List<Contact> conList = new List<Contact>(); 
     
    
    
   if(Trigger.isAfter && Trigger.isInsert)
     {
       for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult') )
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId))
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   conMap.get(e.whoId).Most_Recent_Event_Id__c=e.id;
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
      if(Trigger.isAfter && Trigger.isUpdate)
      {                                                  
    for(Event e : Trigger.new)
         {
           
           if(e.whoId!=null && String.valueOf(e.whoId).startsWith('003') && (e.Type == 'Consult'))
             {
               set_ContactId.add(e.whoId);
             }
        }
        
    
    Map<Id,Contact> conMap = new Map<Id,Contact>([Select Id,StartDateTime__c,Start_Time__c,User_Attorney_Profile_Page__c,User_First_Name__c,
                                               User_Last_Name__c,User_Office_Google_Map_Link__c,User_Office_Phone__c,Phone_Number_Text__c,
                                               User_Office_Website__c,One_of_Our_Attorneys__c,Most_Recent_Event_Id__c from contact where Id IN:set_ContactId]);  
                                               
  
    
                                                 
         
        for(Event e : Trigger.new)
          {
           
            if(conMap!=null && conMap.containsKey(e.whoId) && e.id  == conMap.get(e.whoId).Most_Recent_Event_Id__c)
              
              {
                   conMap.get(e.whoId).StartDateTime__c= e.StartDateTime;
                   conMap.get(e.whoId).Start_Time__c= e.Start_Time__c;
                   conMap.get(e.whoId).User_Attorney_Profile_Page__c= e.User_Attorney_Profile_Page__c;
                   conMap.get(e.whoId).User_First_Name__c= e.User_First_Name__c;
                   conMap.get(e.whoId).User_Last_Name__c= e.User_Last_Name__c;
                   conMap.get(e.whoId).User_Office_Google_Map_Link__c= e.User_Google_Map_Link__c;
                   conMap.get(e.whoId).User_Office_Phone__c= e.User_Office_Phone__c;
                   conMap.get(e.whoId).User_Office_Website__c = e.User_Office_Website__c ;
                   conMap.get(e.whoId).Phone_Number_Text__c= e.Phone_Number_Text__c;
                   conMap.get(e.whoId).Great_Hands_Text__c= e.Great_Hands_Text__c;
                   conMap.get(e.whoId).One_of_Our_Attorneys__c= e.One_of_Our_Attorneys__c;
                   
                   conList.add(conMap.values());
              }
          }
        
          
         system.debug('!!!!!!'+ conList);
          if(conList!=null && conList.size()>0)
             update conList;
   
  }        
}
Hi Team Pls Help me....

Use Case:update below fields from the Most Recent Event corresponding to a contact with type="Call" to the Contact objects in Salesforce 

Below are the fields which we are going to automate :
1.IsPrivate
2.StartDateTime     
3.Subject

Only Using Trigger......