Microsoft
70-573 · Question #180
You have the following event receiver. (Line numbers are included for reference only.) 01Public Overloads Overrides Sub FieldDeleting (ByVal properties As SPListEventProperties) 02…
The correct answer is D. 04properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl. See the full explanation below for the reasoning.
Question
You have the following event receiver. (Line numbers are included for reference only.) 01Public Overloads Overrides Sub FieldDeleting (ByVal properties As SPListEventProperties) 02 MyBase.FieldDeleting(properties) 03 If properties.FieldName = "Status" Then 04 05 06 End If 07End Sub You need to cancel the operation and redirect the user to a custom error page if the name of the deleted field is Status. Which code segments should you add at lines 04 and 05?
Options
- A04properties.ReceiverData = "/_layouts/customErrorPage.aspx"
- B04properties.RedirectUrl = "/_layouts/customErrorPage.aspx"
- C04properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl
- D04properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl
How the community answered
(29 responses)- A7% (2)
- B3% (1)
- C10% (3)
- D79% (23)
Community Discussion
No community discussion yet for this question.