nerdexam
Microsoft

MB-500 · Question #37

An organization has two million customers that are part of the International customer group. Validation must occur when customer records are updated. For all customers where the value of the…

The correct answer is A. ttsbegin; while select forupdate CustTable where CustTable.CustGroup == 'International' { CustTable.DlvMode = 'Air'; CustTable.update(); } ttscommit; C. ttsbegin; update_recordset CustTable setting DlvMode = 'Air' where CustTable.CustGroup == 'International' ttscommit. A has the update call, which will run validation. While D will not as it performs a DoUpdate that only updates the value and skips all validation. E is the most effective, and also will run validation and other methods if needed. To skip validation using update_recordsset you…

Develop business logic

Question

An organization has two million customers that are part of the International customer group. Validation must occur when customer records are updated. For all customers where the value of the customer group field is international, you must the delivery mode to Air. You need to update the customer records. Which two segments can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point. A. B. C. D. E.

Exhibit

MB-500 question #37 exhibit

Options

  • Attsbegin; while select forupdate CustTable where CustTable.CustGroup == 'International' { CustTable.DlvMode = 'Air'; CustTable.update(); } ttscommit;
  • Bttsbegin; update CustTable set DlvMode = 'Air'; where CustTable.CustGroup == 'International' ttscommit;
  • Cttsbegin; update_recordset CustTable setting DlvMode = 'Air' where CustTable.CustGroup == 'International' ttscommit;
  • Dttsbegin; while select forupdate CustTable where CustTable.CustGroup == 'International' { CustTable.DlvMode = 'Air'; CustTable.doUpdate(); } ttscommit;
  • Ettsbegin; update_recordset CustTable setting DlvMode = 'Air' where CustTable.CustGroup == 'International' ttscommit;

How the community answered

(18 responses)
  • A
    72% (13)
  • B
    6% (1)
  • D
    6% (1)
  • E
    17% (3)

Explanation

A has the update call, which will run validation. While D will not as it performs a DoUpdate that only updates the value and skips all validation. E is the most effective, and also will run validation and other methods if needed. To skip validation using update_recordsset you have to call skipDataMethods method on the table first.

Topics

#update_recordset#while select forupdate#X++ DML#set-based operations

Community Discussion

No community discussion yet for this question.

Full MB-500 Practice