Create Task to Schedule a Demo Call
Not Started

Before You Begin:
1. If you haven't already, deploy the pre-requisite Flows: Flow-Into-Apex Package
2. Click on "Run Tests Only" before making any changes. This ensures the Flow works as is without updating the challenge progress.
3. Deactivate the Flow & rebuild as Apex
4. Hit the "Submit" button when you're ready to have your final solution evaluated and challenge progress updated

Flow To Convert:
Lead - Create Task to Schedule Demo

Description:
When a Lead record is created, automatically create a related Task record for the Lead owner with the following information:
  • WhoId: Lead ID
  • Subject: Schedule Demo Call
  • Owner: Lead Owner
  • Due Date: 2 weeks in the future

Object & Trigger Event:
Lead, on After Insert

Concepts to learn:
  • Creating related records
  • Setting due date in the future
  • Catching DML Exceptions

Resources

YouTube Videos

Salesforce Documentation



Challenge Cheat Codes
  • Place your insert logic inside a try-catch block. If a DML Exception occurs, you can simply log it using System.debug() to help with troubleshooting.
  • Pro Tip: While debug logs work for this challenge, in real applications, you'll need a better way to capture and address errors, such as custom logging, email alerts, or tracking with Salesforce tools.