• sfbpinna
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Looking at writing a simple Apex trigger to update a lead or contact field based on a task being added.

 

Have written an after insert Task trigger.  Quick question...

 

What is the best way to determine if the WhatID references a lead or contact?  Can the ID field be treated as a string and what are the ID prefixes for the Lead and Contact table?

 

Thanks!

Looking at writing a simple Apex trigger to update a lead or contact field based on a task being added.

 

Have written an after insert Task trigger.  Quick question...

 

What is the best way to determine if the WhatID references a lead or contact?  Can the ID field be treated as a string and what are the ID prefixes for the Lead and Contact table?

 

Thanks!

Looking at writing a simple Apex trigger to update a lead or contact field based on a task being added.

 

Have written an after insert Task trigger.  Quick question...

 

What is the best way to determine if the WhatID references a lead or contact?  Can the ID field be treated as a string and what are the ID prefixes for the Lead and Contact table?

 

Thanks!