DML Operations
1. What are DML operations? A: DML Operations: Insert , Update, Upsert, delete, Undelete, Merge, rollback, savepoint, emptyRecylebin. 2. What are Atomic Operations? A: Atomic Operation: Which means if any one of the operation fails entire operation will fail. Ex: List<Account> accs=new List<Account>(); Account a1=new Account(Name='aaa'); Account a2=new Account(); accs.add(a1); accs.add(a2); insert accs; o/p :Entire opeation of insert will fail. 3. What are non-Atomic operations? A: Which means if any one of the operation fails remaining operation will run i.e., if error occurs the remaining records will be inserted / updated means partial DML operation will be done. Ex: List<Account> accs=new List<Account>(); Account a1=new Account(Name='aaa'); Account a2=new Account(); accs.add(a1); accs.add(a2); Database.insert accs; // In the above scenario operation is non-...
Comments
Post a Comment