• manikanta sinisetti
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi all,

This is my code:

//If Parent record is undeleted , it's child records should also  be undeleted.

trigger Trg9 on Student__c (after undelete) {
     List<id> StdId=new List<id>();
    for(Student__c s: trigger.new){
        StdId.add(s.id);
  
        }
    list<StudentChild__c> childRecords=[select id,College_of_Student__c,Name from  StudentChild__c where College_of_Student__c in :StdId all rows];
    undelete childRecords;
}

I am getting Error when Undeleing parent record:

User-added image

Please can any one help me out , how to resolve this.
Thanks In Advance.