Q
You have been tasked with extending the InventTable to include a new field for tracking inventory location.
You need to ensure that the new field is initialized with the default inventory location whenever a new record is inserted.
What two methods should you use? Each correct answer presents part of the solution. Choose two.
Question Info
Choose the Best Option
Click any option to instantly check if you're correct.
Explanation
Wrong: Use a batch job to update the new field after the record has been inserted.
Wrong: Modify the doInsert() method in the InventTable class.
Wrong: Create a trigger on the InventTable in the database to initialize the new field.
The correct methods involve creating a new method in the InventTable extension class and calling this method from an event handler for the Inserting data event. Modifying the doInsert() method is not recommended as it prevents data events from being raised. Creating a database trigger is outside the scope of AOT and not a best practice. Using a batch job would not ensure the field is initialized at the time of record insertion.
Write extensible tables - Finance & Operations | Dynamics 365 | Microsoft Learn
Add a table extension to a project - Training | Microsoft Learn
Want to remember what you got wrong?
Create a free account in seconds to track your score, revisit mistakes and continue X++ Programming Language where you left off.
- Save your progress & streak
- Topic-wise quizzes & scores
- Bookmark tricky questions
- Printable MCQ sets
Nice — 3 questions done!
Don't lose this streak. Sign up free to save your score and pick up exactly where you stopped.
Share This Question
Challenge a friend or share with your study group.