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
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.
Field expression not allowed for generic SObject in Salesforce
FIELD_INTEGRITY_EXCEPTION, Related To ID: id value of incorrect type: [WhatId]
null pointer exception
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.- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm
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