+ Start a Discussion

Cross object field update

We have a lead object, and is associated with Releted lists (Task, Events) and each lead record displays Activity History with list of Tasks. We use Marketing automation Software that logs a record for each email it sends.

I have a couple of questions here -

1. I want to update the  lead status field (Picklist) as Disqualified automatically when a task (Activity) is logged by our marketing software with Subject field "bounced". I See the Task Object fields and Subject is one of them.

I tried Workflow rule creating individually for Lead and Task, but none of them have a common field to link and update the field i am looking for.

2. In the same manner as above, I want to update a custom fied in the lead with last email sent date which i can only pull from Tasks (activities) logged in Activity History of that lead record. I tried with Workflow rule and Fied update actions but having the same problem as above.


I have tried to creat a custome object to define Parent-Child, Many-Many relationship as I read in SFDC help. But I lost my way and totally got confused.


I am a novice at coding. Does it require to develop Apexclass etc? Kindly help me on this. Thanks


This does sound like you will need an apex trigger.  I don't think you can navigate from an activity to its parent as the relationship is polymorphic - that is it can refer to a number of different object types.


Thanks for the information.


Being a novice at programming, would it be possible for me to write this apex trigger? Or Do I need to approach SFDC support.


For writing triggers and building workflows do we need to understand the relationship between objects? How many relationships are available and how can I know the existing relationships between my SFDC objects. Could you please share some information on this also. Thanks a lot!!