# MediaSet data type
> Version: _Available or changed with runtime version 1.0._
Encapsulates media, such as images, in application database tables.
## Static methods
The following methods are available on the MediaSet data type.
Method name|Description
mediaset-findorphans-method|Discovers all orphaned media sets. Orphaned media sets are media sets that are not referenced by any other table.
## Instance methods
The following methods are available on instances of the MediaSet data type.
Method name|Description
mediaset-count-method|Gets the number of media objects that are included in the MediaSet of a record.
ExportFile(Text)<mediaset-exportfile-method>|Exports the media objects in the current media set of a record to individual files on your computer or network. In the record, the media set is referenced in a MediaSet data type field.
ImportFile(Text, Text [, Text])<mediaset-importfile-method>|Adds a media, such as a JPEG image, to the MediaSet data type field of a record for displaying the media in the client. The media is imported to the database and included in a MediaSet for the record.
ImportStream(InStream, Text [, Text])<mediaset-importstream-method>|Adds a media file, such as a JPEG image, from an InStream object to the MediaSet of record for displaying in the client. The media is imported to the database and included in a MediaSet for the record.
Insert(Guid)<mediaset-insert-method>|Adds a media object that already exists in the database to a MediaSet of a record.
Item(Integer)<mediaset-item-method>|Gets the unique identifier (GUID) of a media object that is assigned to a MediaSet on a record.
mediaset-mediaid-method|Gets the unique identifier that is assigned to a MediaSet of a record. The MediaSet is a collection of media objects that are used on the record that can be displayed in the client.
Remove(Guid)<mediaset-remove-method>|Removes a media object from a MediaSet of a record.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
../../devenv-working-with-media-on-records

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/mediaset/mediaset-data-type, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/mediaset/mediaset-data-type/
