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
sfdev1sfdev1 

Trigger on Note object not firing

I have a note obejct connected to a Custom Object.
I have create a trigger on the note object but it is not firing at all 
 
 
 
 
trigger MentorRequestNoteNewNote_After_Update on Note (after update) {
    
     System.debug('MentorRequestNoteNewNote fired!');
    for ( Note n : [Select n.Title, n.ParentId, n.IsPrivate, n.Id, n.Body From Note n where Id in : Trigger.new])
    {
        System.debug('Note Id  : '  + n.Id);
        System.debug('Note ParentId  : ' + n.ParentId);
        System.debug('Note Body  : ' + n.Body);
      


        for ( Mentor_Requests__c m : [Select m.Id, m.LastNote__c From Mentor_Requests__c m where Id  = : n.ParentId])
        {
             System.debug('Last note added to Mentor Request');


             m.LastNote__c = n.Body;
             update m;
        
        
        }
    
    
    
    }
    
    

}