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
eduardofernandeseduardofernandes 

[TRIGGER?] Reset all values.

Good morning.

 

I need to implement a solution in my company but do not know if you can perform this task.

I need to delete a value in ALL the opportunities created inside my base. But this taskmust be performed only ONCE.

This can be done?

If yes. How can I make it?

I appreciate the answers.

 

Best Answer chosen by Admin (Salesforce Developers) 
b-Forceb-Force

Are you looking to update any specific field of all existing Opportunities in database.

Following are the approches available

 

DataLoader --- need to extract all records and update

Batch script -- Write apex script for batch updates 

 

Thanks,

bForce

All Answers

b-Forceb-Force

Are you looking to update any specific field of all existing Opportunities in database.

Following are the approches available

 

DataLoader --- need to extract all records and update

Batch script -- Write apex script for batch updates 

 

Thanks,

bForce

This was selected as the best answer
NikhilNikhil

This script could be of some help to u ...

 

you could execute this from Eclipse-->Execute anonymous..

 

List<Opportunity> opps = [SELECT Id, YOURRFFIELDNAME from opportunity Limikt 10000];

for(Opportunity o : opps){

o.YOURRFFIELDNAME  = YOURVALUE ;

}

 

Update opps;

 

Repeat this script if there are more then 10000 Records in your org.

eduardofernandeseduardofernandes

Nice.

NikhilNikhil

If the solution works for you mark it as a SOLUTION / RESOLVED