• tushmat
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Hi,

 

I am trying to create a task on creation of an account in a specific industry.

 

When I try to link the account and Task by putting the account id in the WhoID field of the task, I get a exception when the trigger fires.

 

CreateTaskWhenAccountCreated: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Contact/Lead ID: id value of incorrect type: 0014000000NKcUBAA1: [WhoId]

Trigger.CreateTaskWhenAccountCreated: line 46, column 1

 

How do I link a task to an Account differently to avoid getting this exception?

 

Thanks!!