Hello Everyone
I am new to AL Language and business central. I am not able to understand the code below can any one explain me it will be very helpful.
procedure NWSRequired(Category: Option ,News,Weather,Sports): Integer
var
PlaylistLine: Record "Playlist Line";
RadioShow: Record "Radio Show";
RadioShowType: Record "Radio Show Type";
Cnt: Integer;
begin
PlaylistLine.SetRange("Document No.", "No.");
PlaylistLine.SetRange(Type, PlaylistLine.Type::Show);
if PlaylistLine.FindSet then repeat
RadioShow.get(PlaylistLine."No.");
RadioShowType.get(RadioShow."Radio Show Type");
case Category of
Category::News:
if RadioShowType.Code = 'News' then
Cnt += 1;
Category::Weather:
if RadioShowType.Code = 'Weather' then
Cnt += 1;
Category::Sports:
if RadioShowType.Code = 'Sports' then
Cnt += 1;
end;
until PlaylistLine.Next = 0;
end;
}