fork download
  1. public class DmlStatementstools
  2. {
  3. public static void BangloreRecords(string cityName,string saleQueueName)
  4. {
  5. if(cityName!=Null && cityName!='' && saleQueueName!=null && saleQueueName!='')
  6. {
  7. List<Lead> lstleads=[select id ,ownerid,Name,company,title,status, city__c from lead
  8. where city__c=:cityName] ;
  9. if(!lstleads.isEmpty())
  10. {
  11.  
  12. QueueSobject salesQueue=[select QueueId,Queue.name,SobjectType from QueueSobject
  13. where Queue.Name=:saleQueueName and SobjectType='Lead'];
  14.  
  15. if(salesQueue!=Null)
  16. {
  17.  
  18.  
  19. for(Lead ldsrecords : lstleads){
  20.  
  21.  
  22. ldsrecords.ownerid = salesQueue.QueueId;
  23. }
  24. update lstleads;
  25. system.debug('no of dml statements used ....'+ system.Limits.getDMLstatements());
  26. system.debug('no of dml records ....'+ system.Limits.getDMLRows());
  27.  
  28. }
  29. }
  30. }
  31. }
  32. }
Success #stdin #stdout #stderr 0.02s 10640KB
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:9)
stderr
./prog:3: parse error, expected '}'
./prog:5: expected expression
./prog:5: expected expression
./prog:5: expected expression
./prog:5: expected expression
./prog:9: expected expression
./prog:15: expected expression