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
Nicholas MelonasNicholas Melonas 

Apex Trigger Help!

Hello,

I have Milestones PM+ for Salesforce. Up until now we have been able to change projects in another user's name as the project owner. However today, this message appeared and it won't allow me to change the project owner to another user. Can someone help? Thanks!

Error: Apex trigger MPM4_BASE.Milestone1_Project_Trigger caused an unexpected exception, contact your administrator: MPM4_BASE.Milestone1_Project_Trigger: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id a0G4000000IngfkEAB; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MPM4_BASE.Milestone1_Milestone_Trigger: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object (MPM4_BASE) : []: (MPM4_BASE)

Thanks,

Nick
William LópezWilliam López
Hello Nick, can you please share the code of your "Milestone1_Milestone_Trigger" trigger.

if this trigger its managed, I would say the issue is a missing field, a milestone for that project.
Swayam  AroraSwayam Arora
Please share the code.
Mert YALTIMert YALTI

Hi Nickolas;

Make sure you have instanced every public variable and I thing you should check your SOQL queries with WHERE clause. There might be a null query result or there might be a security problem on your profile; if you made profile updates recently please check your profile. But to be sure it would be better if you can share the code like Bill and Swayam said.

Regards;