• Manish Jha 1
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 4
    Replies
Global  class batchapexopp implements database.batchable<sobject>,database.stateful {
    public  decimal total=0;
    public integer count=0;
  
    Global database.querylocator start(database.BatchableContext BC){
        
        string str='select id, name, amount from opportunity where amount!=null';
        return database.getQueryLocator(str);
        }
    global void execute(database.BatchableContext BC, list<opportunity> scope){
        for(opportunity a:scope)
        {
            total=total+a.amount;
            count+=1;
           
            
        }
    }
    
    global void finish(database.BatchableContext bc){
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
message.toAddresses = new String[] { 'arun.b504@gmail.com' };
message.optOutPolicy = 'FILTER';
message.subject = 'Subject Test Message';
message.plainTextBody = 'Total' +'  '+ total +'  '+ 'Records updated sucessfully';
Messaging.SingleEmailMessage[] messages =   new List<Messaging.SingleEmailMessage> {message};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);
        system.debug('total record updated sucessfully'+count);
    }

}
Hi,

I am looking to expand our development offerings and looking for nearshore development teams or UK development teams to bring on board. If anyone is either from a dev team or can recommend such dev teams it would be realyl useful, i will then respond with some qualification questions. 

Thanks

Charlie

Hi,

 

I am getting the xml data from one system which contains special characters like(&),i have to display xml data in popup window in apex.

The issue is that i am not getting data which is having special characters in xml using res.getbody() method.

 

 

 

Any suggestions are appreciated.

  • October 11, 2012
  • Like
  • 0

Hi,

 

Once a custom object has been created is it possible to still add custom fields to it? I don't mind if data is lost...

 

At the moment if I click on 'Edit' next to the custom object it only gives me a very limited set of options, none of which allow me to add/change fields.

 

Thanks

 

Matt

Hi,

I am looking to expand our development offerings and looking for nearshore development teams or UK development teams to bring on board. If anyone is either from a dev team or can recommend such dev teams it would be realyl useful, i will then respond with some qualification questions. 

Thanks

Charlie