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
myanceymyancey 

How Can I load a value into all records?

I have created a new Case field LevelLevel has a default value of Level 1 and other picklist values of Level 2 and Level 3.   I would like to make Level required on the page layout, but am concerned that if do this, every time someone brings up an old Case (we have over 80,000), they will have to enter Level 1 to save it.  This is a big pain.  Also, I'd like to develop reports and dashboards based on Level knowing that Level will have one of the 3 valid picklist values and won't be empty.  So, given this background info, my question is:

 

Is there a way make Level = Level 1 for all Cases where Level = null?  

 

Is there a way to run a batch workflow/ field update on all 80,000 records? 

 

I'm looking at an app Mass Update Anything.  Anyone use this?

Best Answer chosen by Admin (Salesforce Developers) 
myanceymyancey

I used the Mass Update Anything app.  Worked great.  Did 8 blocks of 10,000.    

All Answers

b-Forceb-Force

you need to use some,

Apex script to update existing cases , this will one time Operation[ only  to update existing

 

/* I had iterate for loop to update all 80000 records*/

for(int i=0; i > 80 ; i++)
{
List<Case> lstCase=[Select Id, Level__c from Case where Level__c=null limit 1000];
for(Case c:lstCase)
{
c.Level__c='Level 1';
}
update lstCase;
}

 

This will update all existing Case records for Level__c picklist

 

 

Cheers,

Bala

 

myanceymyancey

thanks

myanceymyancey

I used the Mass Update Anything app.  Worked great.  Did 8 blocks of 10,000.    

This was selected as the best answer