Create an Task under Opportunity if AccountId is Null ?

Table of Contents

Introduction to scenario

→ Apex Trigger Scenario 7

Develop an Apex Trigger so that when an opportunity is created and the account is blank, create a task under Opportunity. Hint: – AccountId == null

    • Subject – Opportunity is created without Account
    • Description – Opportunity is created without Account, Please assign the Correct account to Opportunity.
    • Due Date – Todays Date + 7
    • Status – Not Started
    • Priority – High
    • Related To (What) – Opportunity Id
    • Assigned To (OwnerId) – Opportunity Owner Id

Hands on


					
				

Dispatcher Class


					
				

Handler Class


					
				

Logger Class


					
				

Outcome




Resources

Vaibhav Kumar
Vaibhav Kumar
Articles: 6

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Panther Schools

Subscribe now to keep reading and get access to the full archive.

Continue reading