• sadikvali shaik
  • NEWBIE
  • 10 Points
  • Member since 2017

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

I have account object in that object account_name field is there. whenever we are going to insert duplicate account names at that time that should remove duplicates and save original value.
Please do the needful.

Thanks,
sadik
Hai,
 Batch apex code for account filedupdate: Getting below error,can anybody help me?
[Error] Error: Compile Error: Argument type of global method must also be global: List<Account> at line 9 column 17

CODE:
global class Accountupdate implements Database.Batchable<sObject>
{
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
        String query = 'SELECT Id,Name,Phone FROM Account ';
        return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext BC, List<Account> scope)
    {
        for (Account a : scope)
        {
           a.Phone='123';
        }
        update a;
    }  
    global void finish(Database.BatchableContext BC)
    {
    }
}