I want to load all routing address one time.(like use csv file by dataloader)
I imported csv data into object emailServicesAddress by dataloader successfully, but the field EMAILDOMAINNAME is xxxxxxx.apex.sandbox.salesforce.com not is xxxxxxx.case.sandbox.salesforce.com.
I can get updated record when i export it by dataloader. but can not display in mail to case setting page.
Add a comment
|
1 Answer
Quickest option would be to open the developer console in the top right of your salesforce instance, after that go to debug and open execute anonymous and copy and paste this code and run it. I had a few similar problems a while back using dataloader and used a similar script to sort the data.
List<emailServicesAddress> emailList = [SELECT id, emailDomainName FROM emailServicesAddress WHERE emailDomainName like '%apex%'];
List<emailServicesAddress> updateList = new List<emailServicesAddress>();
for(emailServicesAddress esa : emailList){
esa.emailDomainName.replace('apex','case');
updateList.add(esa);
}
update updateList;