Salesforce-org-Impact-Labs / 01HousingandHomelessness

Impact Lab - Housing & Homelessness
BSD 3-Clause "New" or "Revised" License
12 stars 11 forks source link

Unable to send Referral when both SMS and Email are selected #317

Open cidarm opened 1 year ago

cidarm commented 1 year ago

Batch Job finished in error when the Referral record had the Preferred Channel set to 'Email;SMS'

Screenshot 2023-01-31 at 3 31 35 PM

Class: Batch_SendInitialClientReferrals.cls Error Message:

First error: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Email body is required.: []

Steps to reproduce:

  1. Go to Contact record
  2. Click Get Recommended services
  3. Click "Refer" button
  4. Check 'Email' and 'SMS'
  5. Run refrec.Batch_SendInitialClientReferrals batchable = new refrec.Batch_SendInitialClientReferrals(); Database.executeBatch(batchable);