Question 1
You are working in a model that extends the Application Suite model, and you want to modify the insert method on the SalesLine table using X++ logic. The code looks like the following:
…
salesLineType.inserted();
…
The salesLineTYpe.inserted() method appears as follows:
public void inserted()
{
}
You need to create a class to run code prior to running the salesLineType.inserted() method in the SalesLineType.insert() method.
What should you do?
Create a new class and extend the onlineserted event.
Create a new class that extends the SalesLineType class. Overwrite the inserted method on your new class.
Customize the SalesLine table. Overwrite the insert() method and add your code immediately before the salesLineType.inserted() method.
Create a new class, and add a method that is a pre-event handler for the salesLineType.inserted() method.
Correct answer: D