You need to sign in to do that
Don't have an account?
Sachin K 13
Attempt to dereference a null object
Dear friends,
Please help me this:
I have trigger code on Task object ( after insert / after update) which is going to update recent due date of completed F2F activity on opportunity custom date field. And there is also a after update trigger code on opportunity which updates the custom field on account that is just updated by task trigger. My question is : I am getting attempt to dereference a null object error. How to solve this. Appreciate if any pointers to achieve this requirement.
Please help me this:
I have trigger code on Task object ( after insert / after update) which is going to update recent due date of completed F2F activity on opportunity custom date field. And there is also a after update trigger code on opportunity which updates the custom field on account that is just updated by task trigger. My question is : I am getting attempt to dereference a null object error. How to solve this. Appreciate if any pointers to achieve this requirement.
It is the problem of the null check, just see if you are fetching only those opportunities that have a account associated with them in the Task trigger because there can be a possibility that you are updating an opportunity that is not associated with any account. It would be better if you can provide your code.
Thanks
Ajay