• ganeshsfdc1@gmail.com
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi,

 

    My batch apex class for deleting the account records is

 

 

global class deleteAccounts implements Database.Batchable<Sobject>  
{  
global final String Query;  
global deleteAccounts(String q)  
{  
Query=q;  
}  
  
global Database.QueryLocator start(Database.BatchableContext BC)  
{  
return Database.getQueryLocator(query);  
}  
  
global void execute(Database.BatchableContext BC, List<SObject> scope)
{  
List<Account> lstAccount = new list<Account>();  
for (SObject s : scope)  //for all objects from our query
      
      {  
       Account a = (Account)s;
lstAccount.add(a);  
}  
Delete lstAccount;  
}  
  
global void finish(Database.BatchableContext BC)  
{  
                //Send an email to the User after your batch completes  
                Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();  
String[] toAddresses = new String[] {'nagalakshmi_b@dskvap,com'};  
mail.setToAddresses(toAddresses);  
mail.setSubject('Apex Batch Job is done');  
mail.setPlainTextBody('The batch Apex job processed ');  
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });  
}  
}

 

 

Now i want to execute the this code for deleting the records. how to execute this? can any one help me.

 

Thanks,

lakshmi.

 

 

Hi,

I'm having troubles with the switchType part of a tabPanel. I can't tell a difference between ajax and server, and client breaks my page by making everything centered and not letting me click any tabs.

I'm trying to have the controller force a tab change by using selectedTab="{!selectedTab}", then having the controller simply change that selectedTab variable. Has anyone made that work?

Also, does anyone have a sample style sheet to change that default green color?

Thanks!
dsl
  • January 05, 2009
  • Like
  • 0