You need to sign in to do that
Don't have an account?
Doondi
Update record without any action?
Hi,
I have custom object: School__c, in that I have a (checkbox)custom field: Old student__c.
There are more than 1000 records in that school object.
I want to udpate Old Student__c =true.
I don't want to edit each and every record and do it manually.
I don't want to bring back data with tools and again update-it's RISKY
Let me know How I can achive this.
Thanks in advance.
I have custom object: School__c, in that I have a (checkbox)custom field: Old student__c.
There are more than 1000 records in that school object.
I want to udpate Old Student__c =true.
I don't want to edit each and every record and do it manually.
I don't want to bring back data with tools and again update-it's RISKY
Let me know How I can achive this.
Thanks in advance.
Find it
Then
Then copy and paste the code below into the resultant code window
List<School__c> schools= [SELECT Id, Old_student__c FROM School__c WHERE student__c = false];
for (School__c school : schools) {
school.Old_student__c= true;
}
database.update(schools); paste the code above into the resultant code window
Click Execute
All Answers
Find it
Then
Then copy and paste the code below into the resultant code window
List<School__c> schools= [SELECT Id, Old_student__c FROM School__c WHERE student__c = false];
for (School__c school : schools) {
school.Old_student__c= true;
}
database.update(schools); paste the code above into the resultant code window
Click Execute
But wanted to know if this is the standard way or best to do if we playing with more data?