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
Grant_at_TractionGrant_at_Traction 

Changes to Lead's isUnreadByOwner field do not cause triggers to fire?

I want to have a trigger which performs some actions based on the status of the isUnreadByOwner flag on Lead. The trigger will work fine if the lead is opened, and then edited in some way, causing the trigger to fire. But if the lead is only viewed, the trigger does not fire, despite the fact that isUnreadByOwner has changed from true to false.

 

Can anyone confirm that updating isUnreadByOwner is a "black box" update that doesn't cause triggers to fire?

Best Answer chosen by Admin (Salesforce Developers) 
IspitaIspita

hi,

 

Well confirming ~ updating isUnreadByOwner is a "black box" update this might take some time , but in the interim I will give you a workaround to fire the trigger even when someone is just wiewing the lead , try putting an invisible VF component on your detail page and everytime it loads update a field say "DoUpdate__c"  now as you are updating a field your trigger will get fired. 

 

Does this sound as a solution to the issue faced by you, if not let me know will suggest other options ?


 


All Answers

IspitaIspita

hi,

 

Well confirming ~ updating isUnreadByOwner is a "black box" update this might take some time , but in the interim I will give you a workaround to fire the trigger even when someone is just wiewing the lead , try putting an invisible VF component on your detail page and everytime it loads update a field say "DoUpdate__c"  now as you are updating a field your trigger will get fired. 

 

Does this sound as a solution to the issue faced by you, if not let me know will suggest other options ?


 


This was selected as the best answer
Grant_at_TractionGrant_at_Traction

Good workaround, thanks for the idea!