Description
txc env data record upload-file reports success when uploading to an image column, but download-file then fails with a FileAttachment lookup error. The round-trip (upload → download) is broken for image columns, while file columns work correctly.
Steps to Reproduce
# 1. Upload a PNG to an image column — reports success:
txc env data record upload-file \
--entity txcv3_valv3rt1434 \
--record-id 11ad3537-704c-f111-bec7-6045bde02116 \
--column txcv3_imagefield \
--file ./test-image.png \
--allow-production
# Output: Uploaded 'test-image.png' to txcv3_valv3rt1434/.../txcv3_imagefield
# 2. Download the same image — fails:
txc env data record download-file \
--entity txcv3_valv3rt1434 \
--record-id 11ad3537-704c-f111-bec7-6045bde02116 \
--column txcv3_imagefield \
--output ./downloaded-image.png \
--allow-production
Expected Behavior
Download should retrieve the uploaded image and save it to the output path.
Actual Behavior
No FileAttachment records found for imagedescriptorId: 13f5eddc-714c-f111-bec6-7c1e52766187
for image attribute: txcv3_imagefield of txcv3_valv3rt1434 record with id 11ad3537-...
Analysis
Querying the record shows txcv3_imagefield: "System.Byte[]" — the image data was stored in the legacy binary format. The download command looks for a FileAttachment record (which is the modern storage mechanism for CanStoreFullImage=true columns), but finds none.
Possible causes:
- Upload stored the image in the old binary format instead of as a FileAttachment
- Download uses FileAttachment lookup but should also handle the legacy binary format
- Image columns may require a different API path (
/entityimage vs /) than file columns
Comparison: File column works correctly
# File upload + download round-trip works perfectly:
txc env data record upload-file --column txcv3_filefield ... # ✅ Succeeds
txc env data record download-file --column txcv3_filefield ... # ✅ Succeeds, content matches
Impact
🟡 Medium — File columns work correctly. Only image columns are affected.
Found during PR #67 (pp-entity-attribute) CRUD validation on https://udpp26-txc-demo.crm4.dynamics.com.
Description
txc env data record upload-filereports success when uploading to an image column, butdownload-filethen fails with a FileAttachment lookup error. The round-trip (upload → download) is broken for image columns, while file columns work correctly.Steps to Reproduce
Expected Behavior
Download should retrieve the uploaded image and save it to the output path.
Actual Behavior
Analysis
Querying the record shows
txcv3_imagefield: "System.Byte[]"— the image data was stored in the legacy binary format. The download command looks for aFileAttachmentrecord (which is the modern storage mechanism forCanStoreFullImage=truecolumns), but finds none.Possible causes:
/entityimagevs/) than file columnsComparison: File column works correctly
Impact
🟡 Medium — File columns work correctly. Only image columns are affected.
Found during PR #67 (pp-entity-attribute) CRUD validation on
https://udpp26-txc-demo.crm4.dynamics.com.