How to Move an Image Between Business Central Tables Using AL
Question details
The user needs to move or transfer an image from one table to another within Microsoft Dynamics 365 Business Central using AL code.

- Product
- Microsoft Dynamics 365 Business Central
- Device & OS
- not provided
- Scenario
- Developing or customizing extensions in AL where media or image fields need to be programmatically copied between tables.
- Observed behavior
- The task requires platform-specific AL development knowledge to correctly handle media or blob fields during data transfer without data loss.
Ensure you have access to your AL development environment (such as Visual Studio Code) and the necessary permissions to read and write to the target Business Central tables.
Consult the Microsoft Dynamics Community Forum
Because transferring Media or MediaSet fields in AL requires specific stream handling, reaching out to AL experts on the official forum is the most reliable approach.
Microsoft Dynamics 365 Business Central handles images using Media or BLOB data types. Copying these fields directly via assignment operators often fails, requiring specific InStream and OutStream logic. The community forum provides up-to-date, tested code snippets for these exact scenarios.
Navigate to the official Microsoft Dynamics Community Forum in your web browser.
Choose the 'Business Central' category under the Dynamics 365 section to ensure your question reaches the right experts.
Create a new thread detailing your specific requirements, mentioning the source and target table definitions, and asking for the appropriate InStream/OutStream AL code.

Use InStream and OutStream in AL (Conceptual)
A standard approach to move BLOB or Media fields involves using data streams within your AL extension to ensure the binary data is copied correctly.
Document Your AL Development with WPS Office
While you need specific AL code to move images in Business Central, WPS Office is the perfect free, lightweight alternative to Microsoft Office for documenting your extensions, writing technical specifications, and managing project requirements.
- 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your workstation.
- 2. Create technical documents: Open WPS Writer to draft your Business Central technical specifications and AL extension documentation.
- 3. Save and share: Save your documents in standard Microsoft Office formats to seamlessly share them with clients and development teams.

Frequently Asked Questions
Can I directly assign an image field from one table to another in AL?
No, simply using an assignment operator (:=) for Media or BLOB fields often does not work as expected. You typically need to use Streams (InStream and OutStream) to properly transfer the binary data.
Do I need special permissions to move table data in Business Central?
Yes, your user account or the extension's execution context must have the appropriate Read permissions for the source table and Insert/Modify permissions for the target table.
Where can I find examples of AL stream copying?
You can find extensive examples in the Microsoft Learn documentation under the AL language reference, specifically in the InStream and OutStream data type guides.




