Because we want the Business Central tables to be the core of the design and to host as much of the processing as makes sense, we will start our enhancement work with table modifications.
The first table modification is to add the data fields to the Playlist Header, as shown in the following screenshot, to support the definition and tracking of various program segment requirements. In the Radio Show table, each show has requirements defined for a specific number of PSAs and advertisements, and for the presence of news, sports, and weather spots. The Playlist Header needs this requirement information stored, along with the associated TSA and advertisement counts for this show instance. We will obtain the news, sports, and weather line counts by means of a function call:
Because Playlist Line includes an Option field that identifies the PSA and advertisement records, we will use a FlowField to calculate the counts for each of those line types. We will construct...