Last active
March 14, 2016 16:34
-
-
Save mkorman/5fd5eee5e3d192cfd53e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger CreateInitialCallTask on Lead (after insert) { | |
List <Task> initialCallTasks = new List <Task> (); | |
for (Lead newLead : trigger.new) | |
{ | |
Task newTask = new Task ( Subject = 'Intial call', Type = 'Call', ActivityDate = Date.Today().AddDays(2), | |
Status = 'Not Started', whoId = newLead.Id); | |
initialCallTasks.Add (newTask); | |
} | |
insert initialCallTasks; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment