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
RichaMidhaRichaMidha 

Maximum Trigger Depth Increased:

I am new to Apex and I am getting the error as Maximum Trigger Depth Increased.
Here is my method:

public static void iterationCloser(list<Milestone1_Project__c> newProjectList)
        {
                      //List<Milestone1_Milestone__c > Iterations = [SELECT Id,Status__c FROM Milestone1_Milestone__c where Project__c= :CurrentProject.Id];
                      List<Milestone1_Milestone__c > Iterations = [SELECT Id,Status__c FROM Milestone1_Milestone__c where Project__c= :newProjectList];
            for (Milestone1_Project__c CurrentProject : newProjectList)
            {
                System.debug('Project Name:'+ newProjectList);

                if(CurrentProject.Status__c=='Completed')
                {
                    System.debug('Iterations:'+ Iterations);

                    for (Milestone1_Milestone__c CurrentIteration : Iterations) {
                                // This is current iteration close it 
                                if( currentIteration.Status__c != 'Completed')
                                {  
                                    currentIteration.Status__c = 'Completed';
                                }
                                
                                }
                     System.debug('Iterations:'+ Iterations);
                    
                }

            }
            update Iterations;
            
        }
Hans LissHans Liss
You may need to post the trigger itself as well, and if you have triggers on Milestone1_Milestone__c, you should add those, too.