You need to sign in to do that
Don't have an account?
sai manoj
Developer Beginner ==> Apex Basics & Database ==> Manipulate Records with DML
I getting Error while doing example which is given by trailhead
while executing this code in anonymous window
while executing this code in anonymous window
// Create a list of contacts List<Contact> conList = new List<Contact> { new Contact(FirstName='Joe',LastName='Smith',Department='Finance'), new Contact(FirstName='Kathy',LastName='Smith',Department='Technology'), new Contact(FirstName='Caroline',LastName='Roth',Department='Finance'), new Contact(FirstName='Kim',LastName='Shain',Department='Education')}; // Bulk insert all contacts with one DML call insert conList; // List to hold the new contacts to update List<Contact> listToUpdate = new List<Contact>(); // Iterate through the list and add a title only // if the department is Finance for(Contact con : conList) { if (con.Department == 'Finance') { con.Title = 'Financial analyst'; // Add updated contact sObject to the list. listToUpdate.add(con); } } // Bulk update all contacts with one DML call update listToUpdate;please giude anyone
As per error, Please check workflows and process builder that's update to "Contact" object and deactivate this.
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukwsh
with regards
https://get3dsemulator.org/ (https://get3dsemulator.org/) https://get-cartoonhd.org/ https://playboxs.me/