ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 69 - MB-820 discussion

Report
Export

You need to access the RoomsAPI API from the canvas app.

What should you do?

A.

Use the default API configuration in Business Central

Answers
A.

Use the default API configuration in Business Central

B.

Enable the APIs for the Business Central online environment.

Answers
B.

Enable the APIs for the Business Central online environment.

C.

Open the Web Services page and publish the RoomsAPI page as a web service.

Answers
C.

Open the Web Services page and publish the RoomsAPI page as a web service.

D.

Include in the extension a codeunit of type Install that publishes RoomsAPI.

Answers
D.

Include in the extension a codeunit of type Install that publishes RoomsAPI.

Suggested answer: D

Explanation:

API Publishing for Extensions:

In Business Central, when creating custom APIs like RoomsAPI, it is important to ensure that they are automatically published during the installation or upgrade of the extension.

To achieve this, you can include a codeunit of type Install in the extension that explicitly publishes the custom API (RoomsAPI) as a web service. This ensures that it is available for use immediately after the extension is deployed without requiring manual intervention.

Codeunit Type:

A codeunit of type Install runs when the extension is installed or upgraded. This type of codeunit can be used to perform setup tasks such as publishing web services or APIs like RoomsAPI.

Why Not Other Options?

Option A (default API configuration): This would not automatically publish the RoomsAPI. Default APIs do not cover custom APIs.

Option B (enable APIs for the environment): Enabling APIs in Business Central allows the standard APIs to be used, but custom APIs still need to be manually published.

Option C (publish via Web Services page): This would work but requires manual intervention to publish RoomsAPI, which does not fulfill the requirement of automatic publishing during installation.

Reference Documentation:

Publishing APIs in Extensions

Codeunit Types in Business Central

asked 13/10/2024
patricia rosales
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first