[SalesForce] Trigger to create task/email when Opportunity is updated with a certain stage

I am trying to create a trigger (possibly After Update) such that it is fired when an Opportunity is updated with a certain stage. It should create a task and send an email to a user. The email should have a link to the Opportunity. Can this be achieved?

Also I would also like to know if Triggers are the only way to do this? Is there an out of the box configurable way to do this?

Best Answer

You can indeed achieve this with an Apex Trigger, however there is also an out of the box or declarative in Force.com speak way to do this. The standard Workflow functionality under Setup > App Setup > Create is where to look for this...

Workflow Task

This is the basic setup to get an email as shown below...

Workflow email

Workflow task

Final Image

Related Topic