exam questions

Exam MB-500 All Questions

View all questions & answers for the MB-500 exam

Exam MB-500 topic 6 question 14 discussion

Actual exam question from Microsoft's MB-500
Question #: 14
Topic #: 6
[All MB-500 Questions]

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 code segments can you use? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A.

B.

C.

D.

E.

Show Suggested Answer Hide Answer
Suggested Answer: DE
This is Update and Update_RecordSet Code sample. Result of both will be same .
TestTable TestTable;

//Update_Recordset
update_recordset TestTable setting Name ="New Enterprises" where TestTable.Accountnum =="uS-027";

//Update
ttsBegin;
while select forupdate TestTable where TestTable.Accountnum =="uS-027"
{
TestTable.Name ="New Enterprises";
TestTable.update();
}
ttsCommit;
info("OK");
Reference:
https://community.dynamics.com/ax/b/technicaltutorialsformsdynamicsax2012/posts/update-and-update-recordset-code-sample-in-ax-2012

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
tonrep
Highly Voted 1 year, 7 months ago
Yes A & E
upvoted 20 times
...
Prollyx
Highly Voted 7 months, 1 week ago
A: correct B: wrong ( should be "update_recordset" and "setting" ) C: wrong ( "where"&"setting" are vice versa ) D: wrong ( don't use .doUpdate() unless you want to purposely skip validation) E: correct
upvoted 7 times
...
trize
Most Recent 7 months, 3 weeks ago
A and E
upvoted 1 times
...
faycal
10 months, 1 week ago
Correct answer is A E
upvoted 1 times
...
Viking2050
10 months, 3 weeks ago
"Validation must occur when customer records are updated." So the answer should be A and E
upvoted 2 times
...
Sisb
11 months ago
A,E Dum D doupadte() wrong
upvoted 2 times
...
ET82
1 year, 3 months ago
To be precise, update_recordset wouldn't need of transaction scope...
upvoted 3 times
...
viking1
1 year, 4 months ago
The provided answer is incorrect. It should be A and E. D is not correct as doUpdate bypasses validation.
upvoted 1 times
...
Anton_Venter
1 year, 7 months ago
Should be AE. doUpdate() will ignore the update method containing validation.
upvoted 2 times
...
Anton_Venter
1 year, 7 months ago
Should AE. doUpdate() will ignore the update method containing validation.
upvoted 2 times
...
ODARK
1 year, 7 months ago
I think A and E. Because 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 I believe 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.
upvoted 3 times
...
Kareemammer
1 year, 7 months ago
I believe the correct answers are A and D
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago