nerdexam
Microsoft

MB-500 · Question #372

A company implements Dynamics 365 Finance and Dynamics 365 Supply Chain Management. The company plans to perform a sales history analysis on existing customers, including their sales history and…

The correct answer is A. RecordInsertList. You can use SQL statements, either interactively or in source code, to insert one or more rows into tables that are stored in the database. insert method - Insert one row at a time. doInsert method - Insert one row at a time. insert_recordset statement - Copy multiple records…

Develop business logic

Question

A company implements Dynamics 365 Finance and Dynamics 365 Supply Chain Management. The company plans to perform a sales history analysis on existing customers, including their sales history and purchases. You are creating an extension to create a sales history table that will run after the close of each period. The historical information must include customer information, date of purchase, and items that are purchased including product descriptions. You need to ensure that the process for retrieving historical information minimizes database calls. Which method should you use?

Options

  • ARecordInsertList
  • BRecordSortedList
  • CInsert_recordset
  • DdoInsert

How the community answered

(46 responses)
  • A
    43% (20)
  • B
    13% (6)
  • C
    35% (16)
  • D
    9% (4)

Explanation

You can use SQL statements, either interactively or in source code, to insert one or more rows into tables that are stored in the database. insert method - Insert one row at a time. doInsert method - Insert one row at a time. insert_recordset statement - Copy multiple records directly from one or more tables into another table in one database trip. RecordInsertList.insertDatabase - Insert multiple rows at the same time in one database trip. Use this construct when you don't have to sort the data. RecordSortedList.insertDatabase - Insert multiple rows at the same time in one database trip. Use this construct when you want a subset of data from a specific table, and you want that data to be sorted in an order that doesn't currently exist as an index. RecordSortedList, RecordInsertList, and insert_recordset let you insert multiple records. By using these methods, you reduce communication between the application and the database. Therefore, you help increase performance. In some situations, record set-based operations can fall back to record-by-record operations. https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-data/xpp-insert https://learn.microsoft.com/en-us/dotnet/api/dynamics.ax.application.recordinsertlist https://learn.microsoft.com/en-us/dotnet/api/dynamics.ax.application.recordsortedlist

Topics

#RecordInsertList#bulk insert#database performance#X++ optimization

Community Discussion

No community discussion yet for this question.

Full MB-500 Practice