MediaSet.MediaId() Method

Version: Available or changed with runtime version 1.0.

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.

Syntax

MediaId :=   MediaSet.MediaId()

Note

This method can be invoked using property access syntax.

Parameters

MediaSet
 Type: MediaSet
An instance of the MediaSet data type.

Return Value

MediaId
 Type: Guid
The GUID of MediaSet on the record.

Remarks

When you import media on a table record by using either the ImportFile Method (MediaSet) or ImportStream Method (MediaSet), the media is assigned to a MediaSet GUID in the system table 2000000183 Tenant Media Set of the application database. You can use the MediaId method to retrieve the MediaSet GUID. Note that the imported media object is also assigned a GUID. To get the media object's GUID, you can use the MediaId Method (Media).

Example

This example is gets the GUID of the MediaSet that is used on item No. 1000 in the Item table. The field in the Item table that is used for the MediaSet data type is Picture.

 var
    item: Record Item;
    mediasetId: GUID;
    Text000: Label 'The GUID of the MediaSet is: %1';
begin
    item.Get('1000');  
    mediasetId := item.Picture.MediaId;  
    Message(Text000, mediasetId);  
end;

See Also

MediaSet Data Type
Get Started with AL
Developing Extensions