+ Start a Discussion
Merry SMerry S 

Trying to create a tigger to update a field on the contact

Hello,

 

I am trying to create a trigger that will update the field "Last Qualifer" on the contact with whomever was the last person assigned a  task. (Assigned To).

 

I am having trouble with this since activites is not really an object, and I am super new to all of this.. any help would be great - or pointer in the right direction.

crop1645crop1645

LessDefined

 

You'll need to write an after trigger on Task; using the whoId field of Task to decide if the Task belongs to a Contact, and then you can update the Contact

SammyComesHereSammyComesHere

Contact is associate with Task or Events (Activities) by Who Id Field and you can Query on the Event or Task Object with Who Id in where clause getting you the activities associated with that contact.