The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
COUNT Method (MediaSet)
Counts the number of media objects that are included in the MediaSet of a record.
Number := Record.MediaSetField.COUNT
Specifies the record.
Specifies the MediaSet data type field for the record.
Property Value/Return Value
Specifies the number of media objects that are associated with the MediaSet field of the record.
This example counts the number of media objects that are available for item No. 1000 in table 27 Item of the CRONUS demonstration database. In this example, the field in the Item table that is used for the MediaSet data type is Picture.
This code requires you to create the following variables.
This code requires you to create the following text constant.
|Text000||The number of media files: %1|
itemRec.GET('1000'); count := (itemRec.Picture.COUNT); MESSAGE(Text000,count);