fork download
  1. ublic class DmlStatementstools
  2. {
  3. public static void BangloreRecords()
  4. {
  5.  
  6. List<Lead> lstleads=[select id ,ownerid,Name,company,title,status, city__c from lead
  7. where city__c='Mumbai'] ;
  8. if(!lstleads.isEmpty())
  9. {
  10.  
  11. QueueSobject salesQueue=[select QueueId,Queue.name,SobjectType from QueueSobject
  12. where Queue.Name='Mumbai_Sales_Group' and SobjectType='Lead'];
  13.  
  14. if(salesQueue!=Null)
  15. {
  16.  
  17.  
  18. for(Lead ldsrecords : lstleads){
  19.  
  20.  
  21. ldsrecords.ownerid = salesQueue.QueueId;
  22. }
  23. update lstleads;
  24. system.debug('no of dml statements used ....'+ system.Limits.getDMLstatements());
  25. system.debug('no of dml records ....'+ system.Limits.getDMLRows());
  26.  
  27. }
  28. }
  29.  
  30. }
  31.  
Success #stdin #stdout #stderr 0.01s 10524KB
stdin
Standard input is empty
stdout
Object: UndefinedObject error: did not understand #DmlStatementstools
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject class(Object)>>doesNotUnderstand: #DmlStatementstools (SysExcept.st:1448)
UndefinedObject>>executeStatements (prog:1)
Object: nil error: did not understand #associationAt:ifAbsent:
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject(Object)>>doesNotUnderstand: #associationAt:ifAbsent: (SysExcept.st:1448)
DeferredVariableBinding>>resolvePathFrom: (DeferBinding.st:115)
DeferredVariableBinding>>value (DeferBinding.st:69)
UndefinedObject>>executeStatements (prog:8)
stderr
./prog:3: parse error, expected '}'
./prog:8: expected expression
./prog:14: expected expression