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
Siva Sankar PaluriSiva Sankar Paluri 

How to delete a specific field value from the object using SOQL

I tried deleting a record from the object by following below steps.

Queried in Dev console using Record Id , then using delete row.
Like this is there any way to delete the specific field value from the DEV console.

Please share your views.

Thank you
Paluri
Ahmad J. KoubeissyAhmad J. Koubeissy
yes, you can try this:
list<account> accounts = [select id,somefield__c from account where id='someid'];
for(account acc:accounts ){
    acc.somefield__c = null;
}
update accounts;

Mark as best answer if this solves ur question
JaimeBidJaimeBid
Nice and easy, thanks Ahmad!