function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Moon KnightMoon Knight 

i want to insert 100 phone number (in 100 contact)in contact object using trigger bulkification,and that 100 contact shoud reflected in my org as well

its urgent
PriyaPriya (Salesforce Developers) 
Hey Moon,

You can try this below batch class :- 
 
Global class BatchcontactUpdate implements Database.Batchable<Sobject>{
    Global Database.QueryLocator start(database.BatchableContext bc){
        return Database.getQueryLocator('Select id, name, email__c, phone from Contact'); 
    }
    
    Global void Execute(Database.BatchableContext bc, List<Contact> con){
        List<Contact> conlist = new List<Contact>();
        for(Contact c : con){
            
            c.Phone= '98989'; //enter the phone number
            
            conlist.add(c);
        }
        update conlist;
        
    }
    Global void Finish(Database.BatchableContext bc){
        //Write logic to send email
    }

}


But in this all the contatcs will get updated with the same phone number. 

So coding approach is not recommended here.

You have to use Data Loader or workbench to update the data in system. Below are the steps to do :- 

1. Run a report on contact and export the 100 contacts with contact id for which you wanted to update the phone number.
2. Open the downloaded excel sheet and fill the each contacts with their respective phone number and save the file in .csv format
3. Now open the data loader and choose update option and upload the file and match the field and click update.

This way all your 100 contatcs will get updated with respecive numbers.

Refer this link :- https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/inserting_updating_or_deleting_data.htm

Kindly mark it as the  best answer if this helps.

Regards,

Priya Ranjan

Moon KnightMoon Knight
i want to insert(Create) 100 contacts with phone number,
penef prittypenef pritty
Here is a simple guide for KFC Experience Survey. Here, you can get KFC Customer Experience Survey Rules, Conditions, and other details on MyKFCExperience Survey.
PriyaPriya (Salesforce Developers) 

Oh .. Then You have to go through the Data Loader only. 

No code is needed or recommended. 

Kindly let me know if you need step for data loading.

Regards,

Priya Ranjan