Microsoft
MB7-702 · Question #75
MB7-702 Question #75: Real Exam Question with Answer & Explanation
The correct answer is C. Place ASSERTERROR before the FA.DELETE(TRUE) statement.. See the full explanation below for the reasoning.
Question
You enhance the standard Fixed Asset table so that a fixed asset record cannot be deleted when the Blocked field is set to TRUE by adding the following code to the On Delete trigger: IF Blocked THEN ERROR(CANNOT_DELETE) CANNOT_DELETE is a text constant containing the ENU caption "You cannot delete this record because it is blocked.". Against the code, a different developer writes a test function named TestBlockedFixedAsset. The function must pass successfully when the Blocked field is set to TRUE and the record is being deleted. The test function contains the following code: FA.INIT; FA."No." := `TEST'; FA.Blocked:= TRUE; FA.INSERT; FA.DELETE (TRUE); You run the test function but it does not pass successfully. How should you update the test function code so that it passes successfully?
Options
- APlace GETLASTERRORTEXT before the FA.DELETE(TRUE) statement.
- BRemove the FA.INSERT statement.
- CPlace ASSERTERROR before the FA.DELETE(TRUE) statement.
- DChange the FA.DELETE(TRUE) statement to IF FA.DELETE(TRUE) THEN.
Community Discussion
No community discussion yet for this question.