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
AiyazAiyaz 

Trigger (nullpointexception)

I'm working on a trigger on a task that currently works if related to Accounts, however I receive the error (shown below) when attempting to save a task that is not related to an account which I understand.  Since the trigger is designed to fire on Task Insert or Update, I need to fire only if its related to Accounts, or Contacts (or both) but no other objects.  Any suggestions?
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger AccountLastCallDate caused an unexpected exception, contact your administrator: AccountLastCallDate: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AccountLastCallDate: line 33, column 9