Bulk Import of Salesforce Profile Photos and Chatter Group Photos

January 26, 2015

If you have a lot of users in your org and have the need to transfer directory/profile photos from a previous platform into Salesforce you will quickly run into a roadblock.  We have a need to assist in importing thousands of Customer Community User Photos.  There is no way to import the photos in bulk using Data Loader or apex script coding.

 

There is an apex class called ChatterUsers in the ConnectAPI namespace which has lots of methods for working with the photos one at a time, but doing this in bulk is trouble with limits which would lead you down a path of writing a javascript app which makes ajax calls to run the import.

 

There are fields in the User object that have been exposed which are the FullPhotoURL and SmallPhotoURL, but these are read-only and there is no way to set them in apex or data loader.  Here is the error from execute anonymous: Field is not writeable: User.FullPhotoUrl

 

Cloudspokes started a contest years ago to write an app to do this.  I found the same-named for-pay app called Chatter Photos Bulk Importer.

 

I checked github to see if there was anything open-source.  I found a project on GitHub built in Java.

 

ChatterUtility

 

 A requirement of using this is to package the source files into a single jar file.  I decided to use Eclipse since I am familiar with it.  I found that packaging in Eclipse is much easier with the following plugin (based on some reviews) so I gave it a try.

  • Fat Jar Eclipse Plugin:

    • Instructions: http://fjep.sourceforge.net/

    • Download: http://sourceforge.net/projects/fjep/

Please reload

Recent Posts
Please reload

At CRM Science, we use our Salesforce expertise to transform your enterprise. Partnering with our clients throughout the Salesforce journey, we work with leaders to strategize and optimize business processes, and design and develop solutions across every Salesforce cloud. We empower companies to innovate faster, better engage with customers, and improve bottom lines. 

 

CRM Science is a Salesforce Silver Consulting Partner. Our strategic consulting services were recognized by Salesforce in four consecutive Salesforce Partner Innovation Awards, an annual recognition for partners that deliver outstanding client success. 

Helpful Content
Blog
Events
Client Success
Connect with us
Email Us
  • Twitter
  • Facebook
  • YouTube

Copyright © 2011-2020 CRM Science, Inc. All rights reserved.