You need to sign in to do that
Don't have an account?

how to perform this...?
Whenever a new contact is created under an account, system should create a task for the loged in user and an email should go to the mail id of the contact
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Whenever a new contact is created under an account, system should create a task for the loged in user and an email should go to the mail id of the contact
Write a workflow on contact, that has two actions : 1. Create Task. 2. Send Email
Reagrds
Santosh
www.santoshkumbar.com
You can do by workflow rule or Trigger
I am sending one sample trigger.You can write trriger for Contact object
trigger Email_Notification on Technician_Assignment__c (after insert,after update)
{
LIST<Technician_Assignment__c > ta= trigger.new;
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
if(tech.Employees__r.E_mail__c!=null)
{
String[] etoaddress=new String[]{tech.Employees__r.E_mail__c};
mail.setToAddresses(etoaddress);
}
if(tech.Contact__r.email!=null)
{
String[] ctoaddress=new String[]{tech.Contact__r.email};
mail.setToAddresses(ctoaddress);
}
mail.setsubject('Service Order Activity Information');
mail.setPlainTextBody('Service Order ID: '+activity.Service_Order__r.Name+'\n\n'+'Activity Step No : ' +activity.Name+ '\n\n'+ 'Priority : '+activity.Priority__c );
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
User u = [SELECT id,name FROM User WHERE Email=:tech.Employees__r.E_mail__c ];
Task t = new Task(ownerId = u.id, Subject='Service Order Avtivity', ActivityDate=ta[0].Activity__r.Date__c, whatid=ta[0].id );
insert t;
}
If your question is resolved please mark it as accept as a solution, If not please let me know.