• Shiva Shankar
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi I am getting the error on Account Record Page while editing Account record from UI  Error: First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.AccConTestTrigger and trigger code is as below

trigger AccConTestTrigger on Account (After update) {
  
    if(trigger.isAfter && trigger.isUpdate){
        System.debug('this is in isAfter and isUpdate context');
     List<Contact> conList=new List<Contact>();
     for(Account acc : trigger.new ){
         Contact con=new Contact();
         con.AccountId = acc.Id;
         System.debug('Account Id value is --->'+con.AccountId);
         System.debug('Account Id value from the screen --->'+acc.Id);
         con.Department = 'The Last Dep';
        conList.add(con);
     }
    update conList;
  }
}
Could some one please help me in this,how to solve this
Hi I am getting the error on Account Record Page while editing Account record from UI  Error: First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.AccConTestTrigger and trigger code is as below

trigger AccConTestTrigger on Account (After update) {
  
    if(trigger.isAfter && trigger.isUpdate){
        System.debug('this is in isAfter and isUpdate context');
     List<Contact> conList=new List<Contact>();
     for(Account acc : trigger.new ){
         Contact con=new Contact();
         con.AccountId = acc.Id;
         System.debug('Account Id value is --->'+con.AccountId);
         System.debug('Account Id value from the screen --->'+acc.Id);
         con.Department = 'The Last Dep';
        conList.add(con);
     }
    update conList;
  }
}
Could some one please help me in this,how to solve this