function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sultansultan 

can we send email alerts trhough execute method of Batch apex?

Vidhyasagaran MuralidharanVidhyasagaran Muralidharan
Yes we can
Go throught this code
https://teachmesalesforce.wordpress.com/tag/salesforce-batch-apex/
sai chandu 10sai chandu 10
reate an object named as “Flipkart”  and create the below fields:
 
  1. Item number
  2. Item name
  3. Price
  4. Customer Name (Lookup to Account)
  5. Customer Email
  6. Customer Phone
  7. PO Status (Order Placed, In Transit, Shipped)
  8. PO Send (check box)
 
 
Create 20 records for the above object and write a batch which fetch all the details where PO Status is equal to Shipped and send an email to those customers where the email is not blank, in case if you didn’t found an email in Customer Email field check in related account email(create an email field in Account object) and send an email?