Changing the Account owner automatically changes the Contact owner. Same principle applies to changing the Case owner, if case has tasks then Task's assigned to will get changed. If you dont want to change the contact owner based on account ownership then you need to write a trigger to handle this.
Please Mark It As Best Answer If It Helps. Thank you...
Hi soni,
I am getting below error , how to solve this problem
EmailException:SendEmail failed. First exception on row 0; first error: SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded: []
*global class LeadDays7 implements Database.Batchable{
List listRecords = new List(); global
Database.QueryLocator start(Database.BatchableContext BC) {
String query = 'Select Id,Name,Email,CheckBox__c,Leadage__c From Lead Where
Leadage__c > 7 LIMIT 10 '; return Database.getQueryLocator(query);
} global void execute(Database.BatchableContext BC, List
scope){ System.debug('aaaaaaaaaaaaaaaaaaaa'+scope);
for(Lead leads : scope) {
if(leads.Email != NULL) {
leads.CheckBox__c = TRUE; }
listRecords.add(leads); } update listRecords;
List emailList = new List();
System.debug('aaaaaaaaaaaaaaaaaaaa'+scope); for(Lead ld: scope) {
if(ld.Email != NULL) { emailList.add(ld.Email);
} } System.debug('bbbbbbbbbbbbbbbbbbbbb'+emailList);
Messaging.SingleEmailMessage email = new
Messaging.SingleEmailMessage();
email.setToAddresses(emailList);
email.setSaveAsActivity(false); email.setSubject('Age is 7
days'); email.setPlainTextBody('Batch Update for Opportunity
Close Date has been completed'); Messaging.sendEmail(new
Messaging.SingleEmailMessage[] {email}); } global
void finish(Database.BatchableContext BC){ }}*
Try the Following Code Just Copy Paste It. Please Mark It As Best Answer If It Helps.
Thank you...
All Answers
Changing the Account owner automatically changes the Contact owner.
Same principle applies to changing the Case owner, if case has tasks then Task's assigned to will get changed.
If you dont want to change the contact owner based on account ownership then you need to write a trigger to handle this.
Please Mark It As Best Answer If It Helps.
Thank you...
Try the Following Code Just Copy Paste It. Please Mark It As Best Answer If It Helps.
Thank you...