{"title":"MediaSet data type","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/mediaset/mediaset-data-type/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/mediaset/mediaset-data-type","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Encapsulates media, such as images, in application database tables.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Static methods","slug":"static-methods","at":128,"chars":247},{"level":2,"title":"Instance methods","slug":"instance-methods","at":375,"chars":1531},{"level":2,"title":"Related information","slug":"related-information","at":1906,"chars":160}],"text":"> Version: _Available or changed with runtime version 1.0._\nEncapsulates media, such as images, in application database tables.\n## Static methods\nThe following methods are available on the MediaSet data type.\nMethod name|Description\nmediaset-findorphans-method|Discovers all orphaned media sets. Orphaned media sets are media sets that are not referenced by any other table.\n## Instance methods\nThe following methods are available on instances of the MediaSet data type.\nMethod name|Description\nmediaset-count-method|Gets the number of media objects that are included in the MediaSet of a record.\nExportFile(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.\nImportFile(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.\nImportStream(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.\nInsert(Guid)<mediaset-insert-method>|Adds a media object that already exists in the database to a MediaSet of a record.\nItem(Integer)<mediaset-item-method>|Gets the unique identifier (GUID) of a media object that is assigned to a MediaSet on a record.\nmediaset-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.\nRemove(Guid)<mediaset-remove-method>|Removes a media object from a MediaSet of a record.\n## Related information\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>\n../../devenv-working-with-media-on-records"}