Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
India Dynamics 365 User Group - Forum

India Dynamics 365 User Group

(0) ShareShare
ReportReport
Posted on by 10

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;
}

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Leaderboard > India Dynamics 365 User Group

Featured topics

Product updates

Dynamics 365 release plans