Microsoft MB6-894 Development, Extensions and Deployment for Microsoft Dynamics 365 for Finance and Operations Online Training
Microsoft MB6-894 Online Training
The questions for MB6-894 were last updated at Nov 19,2024.
- Exam Code: MB6-894
- Exam Name: Development, Extensions and Deployment for Microsoft Dynamics 365 for Finance and Operations
- Certification Provider: Microsoft
- Latest update: Nov 19,2024
You create a new class named NewClass1 in a model. NewClass1 manipulates the CustTable table in the protected method modifyCustTable.
NewClass1 has the following code:
class NewClass1
{
public static MainClass1 construct()
{
return new MainClass1();
}
protected void modifyCustTable()
{
…
}
}
In the same model as NewClass1, you create a new class named NewClass2. You want to run the code in
the modifyCustTable method from the callModifyCustTable method in NewClass2.
What is a correct example of calling the modifyCustTable method from NewClass2?
- A . {
public static NewClass2 construct()
{
return new NewClass2();
}
public void callModifyCustTable()
{
NewClass1 newClass1 = NewClass1::construct();
newClass1.modifyCustTable();
}
} - B . class NewClass2
{
public static NewClass2 contsruct()
{
return new NewClass2();
}
public void classModifyCustTable()
{
newClass1.modifyCustTable();
}
} - C . class NewClass2 extends NewClass1
{
public static NewClass2 contsruct()
{
return new NewClass2();
}
public void callModifyCustTable()
{
this construct().modifyCustTable();
}
} - D . class NewClass2 extends NewClass1
{
public static NewClass2 construct()
{
return new NewClass2();
}
public void callModifyCustTable()
{
this.modifyCustTable();
}
}
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
{
/// <summary>
/// Update the Customer reference field on the Sales orders table.
/// </summary>
/// <param name = "_salesId">
/// Sales order to update
/// </param>
/// <param name = "_customerRef">
/// Updated Customer reference value
/// </param>
public static void updateSalesTableCustomerReference(SalesId _salesId,
CustRef _customerRef)
{
SalesTable salesTable;
}
}
Which statement will complete the method?
- A . salesTable = SalesTable::find(_salesId);
salesTable.CustomerRef = _customerRef;
salesTable.update(); - B . update_recordset salesTable
setting CustomerRef=_customerRef
where salesTable.salesid==_salesId; - C . salesTable = SalesTable::find(_salesId, true);
salesTable.CustomerRef = _customerRef;
salesTable.update(); - D . update_recordset salesTable
setting SalesId = _salesId
where salesTable.CustomerRef == _customerRef;
A junior programmer asks you to review an order of operator precedence so that a math operation evaluates appropriately.
Which list is ordered correctly?
- A . unary, multiplicative, additive, logical, relational
- B . shift, relational, additive, unary, logical
- C . unary, multiplicative, additive, relational, logical
- D . equality, multiplicative, additive, relational, unary
C
Explanation:
You are an Independent Software Vendor (ISV) developer, and you are reviewing the code in a solution.
During the code review, you see the following:
using (var sr = new System.IO.StreamReader(_inputFilename))
{
var textFromFile = sr.ReadToEnd();
this.processFileDate(textFromFile);
}
Which two statements about the sr and textFromFile variables are true? Each correct answer presents a complete solution.
- A . The variables storing .Net Framework objects have to be declared using the var keyword.
- B . The var keyword indicates the variables can store values of any type.
- C . The variables are valid within the block of code in which they were declared.
- D . The var keyword infers the type of the variables from their initialization expression.
You are writing an X++ method.
You need to perform the same logic for multiple records in the database.
How should you iterate over multiple records in X++?
- A . Declare a table buffer variable, and then write a "while select" statement to iterate through each record.
- B . Declare a shared variable for the table, and use the next() method to read each record.
- C . Declare a RecordSortedList variable for the table, and use the next() method to read each record.
- D . Declare an enumerator for the table, and call the moveNext() method to read each record.
You have previously written a PurchOrderActivation class with the following logic:
class PurchOrderActivation
{
private static PurchOrderActivation construct()
{
return new PurchOrderActivation();
}
…
}
You need to instantiate PurchOrderActivation from a new class named
PurchOrderActivationExtended, which extends PurchOrderActivation.
What are two possible ways to instantiate the PurchOrderActivation class in the initialize method of
the PurchOrderActivationExtended class? Each correct answer presents a complete solution.
- A . class PurchOrderActivationExtended extends PurchOrderActivation
{
public void initialize()
{
PurchOrderActivation purchOrderActivation =
PurchOrderActivation::construct();
}
} - B . class PurchOrderActivationExtended extends PurchOrderActivation
{
public void initialize()
{
var purchOrderActivation = new PurchOrderActivation();
}
} - C . class PurchOrderActivationExtended extends PurchOrderActivation
{
public void initialize()
{
var purchOrderActivation = PurchOrderActivation::construct();
}
} - D . class PurchOrderActivationExtended extends PurchOrderActivation
{
public void initialize()
{
PurchOrderActivation purchOrderActivation = new PurchOrderActivation
();
}
}
BD
Explanation:
The construct method is private, so you can not call it from another class.
You are a developer working on a new customized form and are troubleshooting a defect on the form.
The form displays a summary for each line. The defect report says that the form shows the incorrect
summary for return order lines.
A display method provides the summary, and the method calls the following:
public str salesLineSummary(
SalesType _type,
str _orderNum,
ItemId _itemId,
Qty _lineQty,
Amount _lineAmount
)
{
Amount baseAmount = _lineAmount > 0 ? _lineAmount : -1 * _lineAmount;
str formattedAmount = num2Str(baseAmount, 10, 2, DecimalSeparator::Dot,
ThousandSeparator::Comma);
str summary;
switch (_type)
{
case SalesType::Sales:
summary = strFmt(‘Order %1 ordered %2 of %3 [Subtotal: %4]’,
_orderNum, _lineQty, _itemId, formattedAmount);
break;
case SalesType::ReturnItem:
summary = strFmt(‘RMA %1 expecting %2 of %3 for %4 credit’,
_orderNum, _lineQty, _itemId, formattedAmount);
default:
summary = strFmt(‘Journal %1: %2 of %3’, _orderNum, _lineQty,
_itemId);
}
return summary;
}
You need to fix the defect in the most efficient way possible.
Which modification should you make?
- A . Remove the default block of code from the switch statement.
- B . Add an If statement to the default block of code in the switch statement.
- C . Exchange the SalesType::Sales with the SalesType::ReturnItem blocks of code in the switch
statement. - D . Add a break statement before the default block of code in the switch statement.
You are planning to use X++ to develop a solution that will update multiple records.
You need to ensure that if the solution attempts to modify records that are currently being edited by a user, the operation will be retried.
Which type of exception should you handle?
- A . UpdateConflict
- B . CodeAccessSecurity
- C . UpdateConflictNotRecovered
- D . Deadlock
A
Explanation:
UpdateConflict: Indicates that an error has occurred in a transaction that is using Optimistic Concurrency
Control. The transaction can be retried (use a retry statement in the catch block).
You are developing a solution to insert and update records in a table named Table1, and you need to ensure that you handle the possible exceptions. Table1 does not have any unique indexes that include the ID or the Description fields.
The table has the following structure:
What is the output of the X++ code?
- A . Max value
DDEerror
Data error - B . Break
- C . Data error_RC
- D . Max value
DDEerror
Error has occurred
D
You are reviewing the basic set of primitive data types in Microsoft Dynamics 365 for Finance and
Operations with a client.
The client wants to know the best data type to use for a set of literals, such as states of nature or key reporting structures.
Which type should you tell the client?
- A . Strings
- B . Anytype
- C . Containers
- D . Enumerations
D
Explanation:
Enums: An abbreviation for enumerated text – a set of literals.