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
renaiah anamalla 6renaiah anamalla 6 

Dml statements

I have one CustomObject(Mobile) i want to update the Amount record,but amount  all records 5000 .I want to change one Amount record is =10000 How to change the record?
Deepthi BDeepthi B
Hello Renaiah,
I hope the Amount is a custom field in Mobile SObject. If all your records are having 5000 as a for Amount field and to update the record with Amount field value 10000. You can write a SOQL and try to execute the below code in Anonymous block.
Mobile__c mob = new Mobile__c();
mob = select Amount__c from Mobile__c where Amount__c=:10000;
mob.Amount__c=12000;
update mob;
Is this the scenario you require. Kindly let me know if require any help!

Regards,
Deepthi