• Natalie
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Here is my example. I create a training record and send an email out to users to register, they login and register for the class, but they would like to have this event saved on their calendar. I want them to be able to click a button and it would open up a calendar appointment and they would be able to save the event on their Outlook calendar.

Hi All,

 

I have a requirement to show # of open Task on Lead Detailpage. Below is the logic that we are planning to implement. I would like tocheck with you if any one has implemented similar functionality handling BULK insert/update.If so could you please share the code?

 

Trigger on Task <after insert after update>

 

{

    for (Task thistask : Trigger.new)

      {

    // Get all leads assosited to Tasks

    if (WhoId.startsWith('00Q'))               

      leadIdToUpdateList.add(taskWhoId.WhoId);

     }

 

FOR each Lead

           SelectCount() from Task where whoId=LeadId and Status=Completed

           Updatecustom field “ Open Task” on  Lead object

End Loop   

 

}

 

Thank You .