MB-820試験無料問題集「Microsoft Dynamics 365 Business Central Developer 認定」

You need to create the code related to the Subcontract Documents table to meet the requirement for the quality department.
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.
正解:

Explanation:
You are developing a test application to test the posting process of a sales order. You must provide the following implementation:
* Specify the value of post options (dialog: Ship, Invoice, Ship & Invoice) as Invoice.
* Perform calculations and values checking.
You need to complete the development of the test codeunit.
Which methods should you use? To answer, move the appropriate methods to the correct implementation.
You may use each method once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
正解:

Explanation:
Specify the value of the post options as Invoice:
* Test
Perform calculations and values checking:
* Handler
In the context of Microsoft Dynamics 365 Business Central testing, the 'Test' attribute is used to mark a method as a test method. This is where you would specify the action or the behavior you're testing - in this case, setting the post options as Invoice. It's within these test methods that you would simulate setting the posting option to "Invoice" programmatically.
For performing calculations and checking values, you would use 'Handler' methods to handle specific business events or conditions that occur within the system, such as before or after posting a document. These handlers can ensure that calculations are done correctly and that all validation checks pass before the document is posted.
The 'Normal' method would be a standard method that could be involved in the posting process, ensuring that all business logic is correctly applied and that the calculations and value checks are as expected.
In a test codeunit, you would typically have test methods that call these handler and normal methods to verify the business logic in various scenarios, such as posting with different options or checking the results of calculations under different conditions.
A company has a test application.
A user observes the following error messages when running the test:
* "Unhandled Ul: Message'
* "Unhandled Ul: Confirm"
You need to resolve the errors. Which action should you take?

解説: (GoShiken メンバーにのみ表示されます)
You need to evaluate the version values of the Quality Control extension to decide how the quality department must update it.
Which two values can you obtain in the evaluation? Each correct answer presents part of the solution. Choose two.
NOTE: Each correct selection is worth one point.

You need to use a query data type to retrieve required data.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

For each of the following statements, select Yes if the statement is true Otherwise, select No.
NOTE: Each correct selection is worth one point.
正解:

Explanation:
You are creating an entitlement object in Business Central to enable transactability for AppSource apps.
You must map the entitlement object to a plan in Partner Center.
You need to select the value of the Type property to use in the entitlement object.
Which value should you use?

解説: (GoShiken メンバーにのみ表示されます)
A company uses Business Central.
The company plans to use the AL object model in Business Central to extend the Base Application.
You need to extend the objects.
Which two objects can you extend? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

解説: (GoShiken メンバーにのみ表示されます)
You need to develop the report Subcontract Documents Excel List that is required by the control department.
You have the following code:

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
正解:

Explanation:
You need to parse the API JSON response and retrieve each order no. in the response body.
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.
正解:

Explanation:

Code Segment Analysis:
* The AL code is trying to read JSON data from a response and process it to extract subcontracting order numbers. It uses JsonToken, JsonObject, and JsonArray to work with the JSON data.
* JToken.ReadFrom(Data): This line reads the incoming JSON data and converts it into a token. It processes the full JSON body so you can start working with it.
* JToken.SelectToken("results"): This line selects the part of the JSON containing the results array.
The key "results" is where the JSON response data is expected to be found.
* JsonArray: Once the results are extracted, they are stored as an array, and each element in the array (which is expected to contain subcontracting order numbers) is processed.
* SubcontractingOrderNo: The extracted order_no from the JSON is stored in this variable.
Breakdown of Steps:
* JToken.ReadFrom(Data): This step reads the entire JSON response.
* JToken.SelectToken("results"): This step selects the results array from the JSON response.
* JArray.AsArray(): This step converts the selected results token into a JSON array that can be iterated over.
* GetValueAsText(JToken, 'order_no'): This step retrieves the order_no from each element in the array.
Correct Code Completion:
* JToken.ReadFrom(Data): This is the correct method to read the incoming JSON response, as it will convert the string into a JsonToken that can be further processed.
* JToken.SelectToken("results"): This is the correct method to extract the results array from the token.
This method looks for the key "results" in the JSON and retrieves the relevant array.
Final Code Segment:
al
Copy code
procedure ReadJsonData(Data: text)
var
JToken: JsonToken;
JObject: JsonObject;
JArray: JsonArray;
SubcontractingOrderNo: Code[20];
begin
if Data = '' then
exit;
JToken := JToken.ReadFrom(Data); // Step 1: Read the JSON response data.
JToken := JToken.SelectToken('results'); // Step 2: Select the "results" array.
JArray := JToken.AsArray(); // Convert the token into a JSON array.
foreach JToken in JArray do begin
SubcontractingOrderNo := GetValueAsText(JToken, 'order_no'); // Retrieve the order number.
end;
end;
* JToken.ReadFrom(Data): This reads the raw JSON data string and converts it into a JSON token that can be processed.
* JToken.SelectToken("results"): This extracts the results array from the JSON data.
* JArray.AsArray(): Converts the token into an array so we can iterate over it.
* GetValueAsText(JToken, 'order_no'): Extracts the order_no value from each item in the array.
You create a query that contains a procedure to display the top customers.
The procedure breaks at runtime.

You need to fix the code.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
正解:

Explanation:
* Enclose line 08 into BEGIN .. END = NO
* Add TopCustomerOverview.Open(); before = YES
* TopCustomerOverview.SetFilter(Sales_LCY, '>10000'); in line 06.
* Add TopCustomerOverview.Open(); after TopCustomerOverview.SetFilter(Sales_LCY, '>10000'); in line 06. = YES
* Replace SetFilter in line 06 with SetRange. = NO
The code provided has a runtime error because the query TopCustomerOverview must be opened before it can be read from. Therefore, TopCustomerOverview.Open(); should be added before trying to read from the query, which is not present in the code.
Enclosing line 08 into a BEGIN .. END block is unnecessary because it is a single statement, and AL does not require a BEGIN .. END block for single statements within trigger or procedure bodies.
TopCustomerOverview.SetFilter(Sales_LCY, '>10000'); is a correct method to set a filter for the query, and using SetRange instead is not necessary unless the requirement is specifically to set a range of values, which is not indicated in the procedure's description.
In summary, for the procedure to run correctly, the query must be opened after setting the filter and before attempting to read from it. The SetFilter method is correct for the intended operation, and there's no requirement to use SetRange or to enclose the Message call in a BEGIN .. END block.