How should you complete the code segment?

Topic 1, Case Study Alpine Ski House

Overview

Alpine Ski House is a company that owns and operates hotels, restaurants, and stores.

Currently, the company uses the following software and interlace:

• Property management software (PMS) to manage hotel rooms

• On-premises accounting software to generate sales invoices and create purchase orders

• An API that allows restaurants and stores to obtain necessary information

Restaurants and stores use standalone software for point of sale (POS) devices. Each day, the POS terminals generate a text file of sales data and save the files in a serval folder. An account assistant must manually import the files to the current software tables to be processed by the system.

The general manager receives several reports monthly from department managers. The reports take too much time to prepare.

The company is moving from a different system to 8usiness Central online to manage the whole company.

The company plans to increase efficiency in every department by using APIs to obtain or share information between the different systems.

Each department involved in purchasing must be able to make purchase requests automatically and easily. The departments do not need access to the full ERP management system.

Alpine Ski House requires the development of several extensions for the planned improvements.

Business Central design patterns must be used to develop all extensions.

Alpine Ski House must develop the following pages:

• Pages that provide multiple configurations in a multistep dialog, like a wizard, to provide required information when the extensions are first installed

• Department-specific Role Center pages to show relevant information and pages with additional information

The IT department plans to use Power 61 to analyze departmental information. The database must be configured to provide optimal performance.

The housekeeping department requires the following to increase efficiency and help avoid data entry errors:

• A Housekeeping Role Center to minimize navigation to relevant areas In Business Central online and to show relevant information in it

• Pages to embed into a new Room page to show additional information about the Room entity

• A table named Room Incident for the housekeeping team to enter room issue information

• A Housekeeping canvas app that connects to an extension

The department requires the development of an extension with a new API page named RoomsAPI.

• The housekeeping team will use RoomsAPI to publish room details, update when work is complete, or provide repair notifications from the canvas app.

• This custom API page must expose a custom table named Rooms and have an ID 50000. The table must be able to update from the PMS.

The PMS team must know the end to connect to the custom API.

• A developer provides the following details for the API page:

APIPublisher = ‘alpine’;

APIGroup – ‘integration’;

APIVersion – ‘v2.6’;

fntityName ■ ‘room’;

EntitySetName = ‘rooms’;

• The extension must be published in Business Central online and include a list page named Room List that includes all hotel rooms.

• Installation or updates to this extension must meet the following requirements: o Some web services must be published automatically.

o The version of the specified application’s metadata must be obtained in AL language.

o The code required to perform tasks cannot be accessible from other parts of the application.

The Room Incident table information must include the following fields:

• Incident entry: An incremental number

• Room No.: A room from the Room table

• Incident Date: The work date

o The table definition in the Room Incident table must autofill the Incident Date when the housekeeping team inserts a new record.

o The value for Incident Date must be the work date configured in the Business Central online client.

• Status: Includes the following options lo identify the status of the incident:

o Open: When the Room Incident is created

o In Progress: When someone starts repair work

o Closed: When the incident is solved

• Incident Closing Date: Auto-updating field (when the status passes to Closed, the field will update with the work date)

• Incident Description: Text

• Image. Media data type

o The stored picture must be downloadable from a menu action.

o A Room Incident page must be developed to contain the download action.

To increase efficiency, the new system must manage the generated data from the restaurants and stores directly by using the API on the POS terminals.

• The company requires a code unit called from a job queue to read the information from the POS terminal APIs.

• The POS terminal information must be stored in a table named POS Information, have an ID 50100. and be editable on a page.

• The account manager requires an option on the menu of the page to run the process manually.

To analyze the information received from the POS terminals, the company requires:

• A custom API named ticketAPI to export the information to Power BI

• Use of the Read Scale-Out feature to improve database performance

The purchasing department requites a new entity in Business Central online to log non-conformities of goods received from vendors.

The entity must be set up as follows:

• The non-conformity entity must have two tables:

o a header with common information

o one or more lines with the detailed received items that are non-conforming

• The entity requires a page named Non-conformity and a subpage named Non-Conformity Lines to store the information.

When a purchase order with incorrect quantity 01 quality issues is received, the entity must create a non-conformity document in the system.

The following information must be nick the document:

• Non-conformity Number: must use the No.

Series table from Business Central online to manage this field and use these features:

o Alphanumeric values

o Number format that includes "NO and the year as part of the number: for example, NC24-001

• Non-conformity Date: stores only the creation date

• Vendor No.: stores the number of the vendor that sent the items; only vendors from the company must be included

• Owner: code of an employee defined in the company

• Receipt No.: must meet the following conditions:

o Be an existing receipt No.

o Be received from the vendor indicated in the Vendor No. field

• Comments: can include comments with rich text and pictures to illustrate quality problems

• Status: includes nonconformity statuses, such as:

o Open

o Notified

o Closed

• Lines must contain the following details:

o Item No.: item received (for existing inventory items only)

o Description: item description

0 Quantity: non-conforming quantity

0 Non-conformity Type:

■ Quality

■ Quantity

■ Delivery date

The serial numbers of the non-conformities and the period in which they can be created must be in a configuration table and its corresponding page to allow them to be modified for the users.

HOTSPOT

You need to download a stored picture from the Room Incident page.

How should you complete the code segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

var

TempBlob: Codeunit "Temp Blob";

IncidentOutStream: OutStream;

IncidentInStream: InStream;

ImageFilter, FileName: Text;

begin

// Initialize the TempBlob and streams TempBlob.CreateOutStream(IncidentOutStream); Rec.Image.ExportStream(IncidentOutStream); // ‘Rec’ refers to the current Room Incident record TempBlob.CreateInStream(IncidentInStream);

// Set the filters and filename for the image

ImageFilter := ‘Image Files (*.bmp,*.jpg,*.jpeg,*.gif)|*.bmp;*.jpg;*.jpeg;*.gif’; FileName := ‘Customer Picture’;

// Prompt the user to download the image

if not DownloadFromStream(IncidentInStream, ”, ‘Download Incident Picture’, ”, ImageFilter, FileName) then

Error(‘Unable to download the image.’);

end;

Latest MB-820 Dumps Valid Version with 56 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments