Hide field in SharePoint alert email

Chloraphil picture Chloraphil · Jul 13, 2009 · Viewed 8.8k times · Source

How can I hide a field in a SharePoint alert?

I have a custom event list (Calendar). I have a field (of type Note - aka Multi-line text) whose XML contents I generate manually in an event receiver. All my calendar views use this field as the Title for the Month, Week, and Day views.

I have a web part I include on the page that runs a jquery script that converts the XML title into a background color and mouseover text.

The problem is that this field and its ugly xml show up in sharepoint alerts. If I set the field to Hidden=true then it does not show up in the email, but it is no longer available to select as the Title for the Month, Week, and Day views when creating a new View. This is not acceptable as users need to be able to create views and be able to select this field as the title.

Is there another way to prevent this field from showing up in emails, along the lines of ShowInDisplayForm, ShowInEditForm, etc?

Answer

zimdanen picture zimdanen · Jul 13, 2009

Would editing the fields in the alert template fix your issue?

http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx

"To exclude some fields from being rendered in the email, you should include them in the <DigestNotificationExcludedFields> and <ImmediateNotificationExcludedFields> section."