MB6-894 Development, Extensions and Deployment for Microsoft Dynamics 365 for Finance and Operations

Loading demo links...

Showing 4–6 of 10 questions

Question 4

You are an Independent Software Vendor (ISV) developer who is responsible for maintaining code for a solution. During code review, the reviewer identifies the following block of code:

The reviewer requests that you improve readability by removing hard coded values in the code.

Which two steps should you take to fulfill the request? Each correct answer presents part of the solution.

Select all that apply, then click Submit answer.

  • Option A

  • Option B

  • Option C

  • Option D

Question 5

You are debugging in X++ and review the following method:

Which three best practices does this method violate? Each correct answer presents part of the solution.

Select all that apply, then click Submit answer.

  • The method does not assign a value to the variable var2.

  • The If and Else statements should not use braces because each statement is only one line.

  • The parameter _param should be assigned using the format _param = _param + var1.

  • The method manipulated the parameter _param.

  • The return keyword is used in both the If and the Else statements.

Question 6

You are writing a method to update the Customer reference field on a Sales order table record. You begin

by writing the following code:

class ExampleClass

{

///

/// Update the Customer reference field on the Sales orders table.

///

///

/// Sales order to update

///

///

/// Updated Customer reference value

///

public static void updateSalesTableCustomerReference(SalesId _salesId,

CustRef _customerRef)

{

SalesTable salesTable;

}

}

Which statement will complete the method?

Select an option, then click Submit answer.

  • salesTable = SalesTable::find(_salesId);
    salesTable.CustomerRef = _customerRef;
    salesTable.update();

  • update_recordset salesTable
    setting CustomerRef=_customerRef
    where salesTable.salesid==_salesId;

  • salesTable = SalesTable::find(_salesId, true);
    salesTable.CustomerRef = _customerRef;
    salesTable.update();

  • update_recordset salesTable
    setting SalesId = _salesId
    where salesTable.CustomerRef == _customerRef;