Quantcast
Viewing all articles
Browse latest Browse all 113

XrmToolBox Tool: Entity Image Updater

Around middle of last week, I published v1.0 of a new XrmToolBox tool called Entity Image updater. I created this tool so that it is easier to update the images on the crm record, if that entity has an image field.

When an entity has an image field and no image has been uploaded, it displays the default person image next to the primary name label.

Image may be NSFW.
Clik here to view.
BeforeImage

You can upload an image, by clicking the person image and choosing a local file.

Image may be NSFW.
Clik here to view.
UploadImage
Once the image is upload, the form looks much nicer IMHO.

Image may be NSFW.
Clik here to view.
AfterImage
Even though this capability exists, not many people seem to use this because:

  1. You need source the images
  2. Manually upload them one by one OR write code to upload them based on some conditions

There are so many APIs available to retrieve this data. The most useful of these APIs for this task are

  1. Clearbit – Retrieve logo based on an organisation URL
  2. Twitter – Retrieve logo based on a Twitter handle
  3. Gravatar – Retrieve logo based on a person’s email. This works only if this person has a Gravatar profile

We can try to first source the logo/avatar from these APIs, and we fail to retrieve we can still fallback to uploading an image that is relevant. This is where I believe this tool will be useful. Here is how it looks after the tool has updated the entity images.

Image may be NSFW.
Clik here to view.
Entity Image Updater Screenshot
The tool actually updates a field called “entityimage” in the entity.

Image may be NSFW.
Clik here to view.
EntityImageField

Installation

  1. Download the zip file from https://github.com/rajyraman/Ryr.XrmToolBox.EntityImageUpdater/releases/latest
  2. Right click on the zip file, tick Unprotect and extract the dll into the XrmToolBox’s Plugin folder

Using the Tool

  1. After opening the tool, click “Load Entities” to display all entities
  2. Choose an entity that has an entity image field. You’ll know that an entity has this field, if it has the person default image on the form. This is important, as I currently don’t check if the entity has this field or not. I plan to do this in the next version.
  3. Choose a source for the images. If you chose “Local Folder” you will be asked to select the folder that has the images. Please ensure that the folder has the right sized images. I plan to add resize, upload capability in the future version for “Local Folder” option
  4. Choose an attribute whose value you would use to search. For eg. if you choose “Clearbit”, select a field that has the company’s Url. This could be the file name, if you chose “Local Folder” (only png, jpg and jpeg images can be used, if you chose this option)
  5. Click on “Update All“, if you would like to lookup and update all the records for this entity
  6. If you would like to specify a criteria for update, then click the “Selective Update” field. For eg. you might want to only update records that were created by you. This will open FetchXML Builder that will help you build the conditions. Currently there is a 5-10 second delay in opening the FXB tab. I am still investigating the reason for this delay and will update the tool, once I figure out the fix. The tool will start the update process, straight after you click “Return FetchXML” in the FetchXML Builder tool

The tool will display all the images that were updated in the results window. I haven’t added the capability to save these images to disk, but I will add it in the future if that is a useful feature. I hope this tool will help all CRM folks to fully utilise the entity image field. Please feel free to use the Entity Image Uploader Issues area to log any issues that you encounter.

Thank you to

  • Guido and Adam for their feedback and suggestions
  • Tanguy for XrmToolBox
  • Daryl aka DLaB for the XrmToolBox improvements
  • Jonas for FetchXml Builder

Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 113

Trending Articles