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
nagamalli tadikondanagamalli tadikonda 

what are the errors you faced in triggers

what are the errors you faced in triggers
Devanshu soodDevanshu sood
Well, a lot of errors come across once you start writing triggers. These errors range from small spelling mistakes to exceptions and governor limits. some of these are

Field expression not allowed for generic SObject in Salesforce
FIELD_INTEGRITY_EXCEPTION, Related To ID: id value of incorrect type: [WhatId]
null pointer exception
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Nagamalli,
Generally, we will face  Types of error in triggers
  • usually, you can face DML exceptions
  • Callout Exceptions
  • Governor Limits
  • Recursive Triggers
  • Validation / Data Integrity Exceptions
  • And the list goes on.......
But most of the Exceptions can be caught using Try Catch Exception. Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question removed from an unanswered question and appear as a proper solution for similar kind of questions.

Thanks
Rahul Kumar