nerdexam
Microsoft

MB6-894 · Question #47

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++?

The correct answer is A. Declare a table buffer variable, and then write a "while select" statement to iterate through. See the full explanation below for the reasoning.

Question

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++?

Options

  • ADeclare a table buffer variable, and then write a "while select" statement to iterate through
  • BDeclare a shared variable for the table, and use the next() method to read each record.
  • CDeclare a RecordSortedList variable for the table, and use the next() method to read each
  • DDeclare an enumerator for the table, and call the moveNext() method to read each record.

How the community answered

(60 responses)
  • A
    72% (43)
  • B
    8% (5)
  • C
    3% (2)
  • D
    17% (10)

Community Discussion

No community discussion yet for this question.

Full MB6-894 Practice