+ Start a Discussion
Sharron VolgyesSharron Volgyes 

Trying to create a really simply trigger...

I'm trying to create a really basic trigger.  Essentially what I'm looking for is that when a specific line item is added to an opportunity, a field in the related account record is updated.  Here's an example:


Company ABC has always purchased purple widgets, so they're on our 'purple widget' campaign - as defined by the (custom) Marketing Campaign field on the Account Record.  Today, they purchased blue widgets. So we want to change the Marketing Campaign field from purple widget to blue widget.


I'm thinking that this should be a fairly easy trigger.  Could anyone point me in the right direction?

Maybe you can use Workflow/Field Updates instead? I think it would be easier and more stable.