• Samuel Hoffman 2
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
  • 2
Hi all,

I'm working on some email integration stuff. I need to perform actions on the related object when an email is sent from Salesforce.

I understood that when you send an email from salesforce interface, it creates an EmailMessage record. So I defined a trigger on EmailMessage's "after insert" events but I can't figure out how EmailMessage records are linked to the SObject records they are related to. This link should exist since you can see the emails that were sent on the record's page but I already checked a few fields such as RelatedTo and ParentId fields, none of them contain the Id of the record they are associated to...

Thanks for your help
I have created some custom fields on lead object to capture alternate contact details apart from main contact.

My requirement is when we normally convert lead so it become Account, opportunity and contact. I want those custom contacts details should become as second and third contact details under the account.
How can I achieve this. Please help!
Please find below code which is not working as expected:
trigger LeadConvert on Lead (after update) {

    map<Id, Lead> mapNewLead = trigger.newMap;
    List<Contact> lstContact = new List<Contact>();
    for(Lead objLead: mapNewLead.values())
       if (objLead.isConverted == true) 
         lstContact.add(new contact(LastName = objLead.First_Other_Contact_Name__c));
         lstContact.add(new contact(Phone = objLead.First_Other_Contact_Phone__c));
         lstContact.add(new contact(Email = objLead.First_Other_Contact_Email__c));
    insert lstContact;


Hello everyone ,


I had a question about chatter anlytics.

Is it possible to get to know who viewed a post by a specific person ?


I looked in to all the realted chatter objects but couldn't find any relevent attibute.


Any help would be appriciated.



  • April 15, 2013
  • Like
  • 1