Can anyone please help? My problem is that I am trying to write a trigger on the Lead object that will fire when a new lead is inserted. I want this trigger to look at the campaign that the lead has been assigned to and then use certain values from that campaign to set values of some of the lead record fields.
I have tried doing this in an after insert trigger but I am unable to write to lead record fields in an after insert trigger. Then in the before insert trigger I can't pull back a list of campaign members based on the lead id because the lead doesn't exist in the database yet.
Is there an easier way for me to those this? I think I am making this more complicated that it should be.