QuestionQ226

Develop and test code

An organization has two million customers in the International customer group.

Validation must occur whenever customer records are updated. For every customer whose customer group field value is International, you must set the delivery mode to Air.

You need to update the customer records.

Which two code segments can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Choose two
  • A
  • B
  • C
  • D
Explanation

Calling update() on records selected with forUpdate performs the table update process within the transaction. update_recordset is the X++ statement for updating multiple records in one database operation, and its required clause order is setting followed by where; if the table update method is overridden, the operation falls back to record-by-record processing. Thus both the per-record forUpdate/update() pattern and the correctly formed update_recordset pattern meet the update requirement.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!