You need to sign in to do that
Don't have an account?
trigger, email new lead
Ok, I'm just getting started in SF, and I'm under a time crunch. Normally for a basic problem like this I would spend the time to RTFM before asking this, but right now I just need help getting this done.
We have leads that are coming in two ways, entered directly into SF, and by filling out a form on our website. I want to create an insert trigger that sends a welcome email IF the 'send_welcome_email' flag is set on the user. Then I want to clear the flag.
So far, I have nothing. The only thing I DO have is the force IDE set up so I can put triggers on my leads (I'm not working on the sandbox, but the real thing.) I've done a blank trigger just to make sure, and it is installing.
Does anyone have an example of what this trigger should look like?
Thanks!
Not that it matters, but my experience is in PHP.
Here is a sample in the online doc.:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm
All Answers
Here is a sample in the online doc.:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm
Thank you!
I also realized I could use workflow to look at the Welcome_email field I just created, send an email, then clear the field.
And I've already got PHP creating leads in the system with Welcome_email__c = True, which also sends.
Oh, and I made my workflow create a follow up task as well.
So, when would you suggest I use APEX to do a trigger vs creating a workflow? I guess APEX is more flexible and would do whatever you asked of it.
Thanks!