Skip to content

Instantly share code, notes, and snippets.

@mkorman
Last active March 14, 2016 16:34
Show Gist options
  • Save mkorman/5fd5eee5e3d192cfd53e to your computer and use it in GitHub Desktop.
Save mkorman/5fd5eee5e3d192cfd53e to your computer and use it in GitHub Desktop.
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