How can I set (preferably batch-style) default values for custom fields on existing leads? New leads have the default values as set in the field itself, but existing leads just have blank values. Is there a way around that?
- Export Leads via Data Loader - manipulate in Excel, then Upload
- If you are brave, use Developer Console and anonymous apex. Test out your script in sandbox first and take a backup of Leads beforehand (using Data Loader). The anonymous Apex allows you to do some things easily that would be a pain in Excel but you will have to watch out for Apex governor limits if dealing with a large number of Leads. Some orgs may not permit this by policy.
- Write a batch Apex class that process any number of Leads. You'll build this in a sandbox, test thoroughly, and then deploy to PROD. It can be launched from anonymous apex:
- Use enhanced Lists and various filters to find the Leads that are missing data. You can mass edit up to 200 rows at a time with a couple of clicks. Then rinse and repeat for all Leads. Practical if the number of Leads to touch isn't too large. May need multiple List Views with unique filters to get at all your Leads with missing data
- Some various appexchange tools as described here: http://www.salesforcegeneral.com/salesforce-articles/bulk-update-records-in-salesforce.html or https://yashi.com/blog/implementing-mass-update-and-mass-edit-buttons-salesforce or https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003J6KcEAK or https://www.crmfusion.com/demandtools/demandtools-details/
Since you are touching Leads, you may need to turn off some process builder flows / workflow rules that might inadvertently spam the person-behind-the-leads or your sales team
In short, your options are going to be guided by how free you are to smash PROD data without formal processes and by how much logic needs to be applied to set the defaulted values