You need to sign in to do that
Don't have an account?

How to change default value Automatically
Hi All
I have one goal and how to solve this .i have 500 existing record one of my object.in this object one field (%) with default value 10%. i need to chnage that field with 5% from 1st june .how it is possible
I have one goal and how to solve this .i have 500 existing record one of my object.in this object one field (%) with default value 10%. i need to chnage that field with 5% from 1st june .how it is possible
You could use data loader to mass update them.
Build report of the leads you want ot update (include the Record ID field for reference) and export it to csv file.
Modify the field desired.
Use the update function of Open data loader.
I hope this help you.
List<Object> oList= [SELECT Id, Name FROM Objet];
for(Object o :oList){
o.Name = 'something';
}
update oList;
global class ScheduledUpdatePercent implements Schedulable {
global void execute(SchedulableContext ctx) {
List<CustomObject> objectList = [Select id, Percent_Field__c from CustomObject];
for(CustomObject co : objectList){
co.Percent_Field__c = 5;
}
update objectList;
}
}
and Open Execute Anonymous Windows schedule the job (Developer Console). For example:
System.schedule('UpdatePercentToday', '0 00 14 2 6 ? 2016', new ScheduledUpdatePercent());
This execute the job once, today at 14:00.
I hope this let you achieve your Goal.