Home > SharePoint > Custom Error Message for Event Receiver

Custom Error Message for Event Receiver

 

SharePoint default error are not user friendly, for that if you need to show your own error message for even receiver exception then what would you do ?

This blog post is simply and specially written to deal in that situation.

You just need assign your custom error message to properties.ErrorMessage

Smile 
                        properties.ErrorMessage = This is my custom error message.;
                        properties.Cancel = true;

Moreover you can perform formatting with string for better presentation of your custom error message.

Advertisements
  1. IndianTiger
    April 18, 2017 at 6:05 pm

    Thank you so much… it was helpful…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: