Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a solution in which a few site columns are deployed. These columns are used in a few hidden lists, and webparts showing data from these columns have logic which checks the permissions of the user. When the user lacks permission, the columns aren't displayed.

Now when a user is added, there is a notification being generated for one of those lists. The user receives an e-mail of updates on list items, but that lists the column that should not be shown! Also, when the user click on one of the items from the notification mail, the link takes him to the hidden lists, displays the item and again the things I didn't want to show.

So now I need to perform an update on my solution to make sure this doesn't happen again. I'm just not sure what I should exactly change. I noticed an SPField has a property 'Hidden' which I could set to false; but would that also keep it from rendering in item display views and notification mails? There's also the DisplayInNewForm and DisplayInEditForm properties, but I'm not sure if those are also used by the notification mail.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

I'm not sure if the 'ShowInXXXX' properties for SPField are obeyed by email generation, but I'd start by trying them. They're simpler to use. I expect you'd have best luck with 'ShowInViewForms'.

The Hidden attribute will also work, but you also need to be aware of a second property - CanToggleHidden. If you don't set that to true, you can end up defining fields that are hidden, and you can't later unhide if you want to.

Also, I note this question is similar to another on StackOverflow: http://stackoverflow.com/questions/1120427/hide-field-in-sharepoint-alert-email

share|improve this answer
    
Thanks, since the other thread is marked answer I'll assume at least one of these will work. After trying them out I'll post which one works best. –  Jasper Jan 17 '12 at 6:45

Making a column Hidden will hide it in everything but code. You could try setting it to hidden using powershell in a test environment to be sure.

share|improve this answer

Make sure you apply proper security at the list level. SharePoint will honor the security no matter what link the user is clicking.

share|improve this answer
    
There is no security on column level as far as I know? A normal user should be able to view list items, but not all columns for those items. So a user may get an update when an item is changed, but the private columns shouldn't be in the alert. It would be even better when the alert is only sent out when a visible column (visible to a normal user that is) changes. –  Jasper Dec 27 '11 at 10:33
    
Indeed, there is no column level security –  Andy Burns Jan 17 '12 at 17:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.