• Prakash Devloper
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
In org 1000 users are there but org has 25 user license. How to share licens between users without purchasing extra licenses?
Is there any tool or code todo the work?

Heere is the code.
public class batchApex implements Database.Batchable<sobject> {
    public static List<account> aclist = new List<Account>();
    public static Database.QueryLocator start(Database.BatchableContext bc){
        return Database.getQueryLocator('select Name From Account');
    }
    public static void execute(Database.BatchableContext bc,List<Account> accList){
        
        for(integer i=0;i<50002;i++){
            Account acc = new Account();
            acc.Name='Test'+i;
            acc.AccountNumber='1234567';
            aclist.add(acc);            
        }
        insert aclist;
    }
    public static void finish(Database.BatchableContext bc){
        
    }
    
}

batchApex obj = new batchApex();
Database.executeBatch(obj,2000);
It show error that Too many DML rows: 10001.
Batch apex can process upto 5million record .Why it showin error.
And
If the first transaction succeeds but the second fails, the database updates made in the first transaction are not rolled back. How it works ?
In org 1000 users are there but org has 25 user license. How to share licens between users without purchasing extra licenses?
Is there any tool or code todo the work?
How can I update more than 10,000 records using an apex batch class at a time?