When moving data from a custom Table I created to store Rich Text Images into another environment using the XRMToolbox data transporter, I noted the images looked blurry:
Checking the image size, it’s only a small image (like a few KB) when the original image had more than 200kb in size.
So I wondered, what went wrong in the copy.
It turns out the Image field is a reference to a ‘FileAttachment’ table item on the background, and we can’t easily copy and filter items from the FileAttachments using the XRM toolbox.
Power Automate to the rescue!
When playing around a Flow to try helping with the data copy I noted two actions in Power Automate that actually I had never used before:
- Download a file or an image
- Upload a file or an image
And with the ‘For a Selected Environment’ actions, we have the same. So we could create a manually triggered flow that gets all images from a source and updates it in the destination environment.
Considering that all other field values were already copied, we can create a simple flow as below (given the Id’s of the items will match across environments):
Note: Mark the image resolution as ‘full’ when getting the image to get it in full size.
Results:
After running a flow, the images will be updated in full resolution: