.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to assign Item Level Permissions when a new item is created

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :SharePoint

Here's my situation: We have a document library which contains employee's performance evaluation documents.  Everyone will have a document, so everybody needs access to this document librairy.  We enabled content types on this library beacause there are different performance templates.  Also we added some metadata (columns) for Employee, Supervisor, Second Level Supervisor.  Once the document is created and saved, a workflow starts which removes everyone's rigths on the document and gives rights to "Employee, Supervisor and Second Level Supervisor".  The workflow works great.

The problem is: The workflow starts with the job called "Workflow" that runs every 5 minutes.  This means the document is available for everyone to see until the workflow actually starts (between 1 and 5 minutes).

Is there another way around this?  Does someone have a solution for my situation?  I need everyone to be able to create a new document in this document library, but once the document is created, it must have only specific rights.  And the process must be as easy (transparent) as possible for the user because it will be used by hundreds of people.

Thanks for any suggestions.

View Complete Post

More Related Resource Links

expense claim application - how to set up item level permissions on expense claim document set


Hi All,

I want to create an app that replaces the existing paper-form based expenses reimbursement process with a SharePoint solution.

I have created a content type called an Expense Form Set ( it includes an excel sheet for the user to enter expenses and also includes any digitised receipts associated with the claim )

The claimant can create an expense form set in an Expense claims document library and the Expense Claims Approver is notified, they approve or reject and reimburse if necessary.

however there is a stumbling block.

How do we prevent anyone else other than the person who submitted the claim and the person who needs to approve/reject from seeing the expense claim.

Is turning on content approval the only way to do this.

If so then the act of approving the content will make it visible to anyone else who has view or contribute access to the library.

thanks and regards,


Item-level Permissions in List Advanced Settings

Is the "Item-level Permissions" in List Advanced Settings, a security option or is it a way to filter data for the user?
How does it work with the permission done on the item level when breaking inheritance with the list?


Need a CSS Friendly Menu Adapter in with I can assign each first-level menu item a different CSS?



According to my project requirments I have to create an ASP.Net menu with each menu item having a different background image.

For this I need a CSS Friendly Adapter, I have searched alot and found this one Horizontal Menu Adapter .

Now I have a question regarding the web.sitemap defined in an example that comes with this above adapter code-

<?xml version="1.0" encoding="utf-8" ?>
<siteMap >
  <siteMapNode url="Nothing.aspx" title="Nothing"  description="Nothing">
    <siteMapNode url="Home.aspx" title="Home"  description="Home"></siteMapNode>
  <siteMapNode url="Forum.aspx" title="Forum"  description="Forum" >
    <siteMapNode url="MyPost.aspx" title="My Posts" description="My Post"/>
    <siteMapNode url="AllPost.aspx" title="All Posts" description="All Posts"/>
    <siteMapNode url="NewPost.aspx" title="New Posts" description="New Posts"/>

ASP.NET 4.0 Menu Top Level selected item style


I want to apply a css class to the level 1 menu item (parent) when it or any or it's children are selected.

I've looked at MSDN documentation and any number of examples and walkthroughs but I haven't come up with a way of managing this. I was thinking something like this might work but the style is not being applied to the parent. To further complicate matters, if I try to apply a css style to StaticSelectedStyle it doesn't pick it up at all.

Menu Markup:

<StaticSelectedStyle  Font-Bold="True" ForeColor="#3333CC" />

Code Behind:

        protected void MenuItemClick_NavMenu(Object sender, MenuEventArgs e)


            MenuItem parentItem = e.Item.Parent;

            if (parentItem != null)


                parentItem.Selected = true;



Workflow "Failed on Start (retrying)" when new item created by BizTalk SharePoint Adapter


We've been using the BizTalk SharePoint Adapter to load various different contents into a MOSS 2007 Document Library. The library has a Microsoft Office SharePoint Designer 2007 workflow (sequential workflow created in Designer) which starts automatically when a new item is added to the Document Library. Or, at least, it eventually starts automatically.


For some unknown reason--and this is what we're hoping some of you may have some ideas on--the workflow fails to start on the first try, producing the "Failed to Start (retrying)" message. When the timer job comes back the second time, the workflow starts successfully, but this causes us to loose five minutes of potential work time (not to mention making us look bad to the VPs and CTO because they see the failure message).


In checking the log, I find the following pair of error messages each time the "Failed to Start (retrying)" status occurs:


08/27/2007 13:49:43.24  w3wp.exe (0x0CA0)                        0x1438 Windows SharePoint Services    Workflow Infrastructure        72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="1" Column="1" Text="The root activity type is invalid.&q

Item/Document permissions affect Library/List permissions

When I change the permissions on a item/document in a library/list the permissions are also changed on the library/list even though I stopped inheritance.  When I change the permissions on the library/list it also changes permissions on items/documents in that list even if inheritance is removed.

Item/Document vs. Libray/List permissions

When I change the permissions on a item/document in a library/list the permissions are also changed on the library/list even though I stopped inheritance.  When I change the permissions on the library/list it also changes permissions on items/documents in that list even if inheritance is removed.

Dynamic list item title based on date created & regional settings?

I have a list of things that doesn't *need* a title.  However, because sharepoint uses Title for links, RSS etc  I tried generating a title in an event handler.   This would work great if I wasn't basing it on a date field: public override void ItemAdding(SPItemEventProperties properties) { DateTime dt = Convert.ToDateTime(properties.AfterProperties["TestDate"]); properties.AfterProperties["Title"] = dt.ToShortDateString(); base.ItemAdding(properties); } In testing, this sets the title to "8/9/2010" when I selected 8/10/2010 in the date picker.  I figure this is because of the regional settings of my test user.  I can probably correct the title value for 'test user' but that won't fix 'test user in mongolia' who would still see two different values. So What I would like is to have the Title always display the value MyDate in the uesr's locale.  So the field needs to be dynamic not only at edit/update time, but at display time. Does anybody know if this can be accomplished, and more specifically how?

How to remove 'Delete Item' from context menu of a programmatically created list?

How to remove 'Delete Item' from context menu of a programmatically created list?
I have document library which is created programmatically but now I don't want to have 'Delete Item' in context menu of that document library. Are there any possibilites?

SPD 2010 status 'Canceled' when using action 'Replace List Item Permissions'



I have been experiencing issues with using action "Replace List Item Permissions" with SPD 2010.
When adding an new list item the workflow runs as expected.
When editing the same item later, the workflowstatus gets "Canceled" and the joblog tells me:

09/22/2010 15:55:14.41  w3wp.exe (0x3584) 0x37B4 SharePoint Foundation Workflow Infrastructure 72fv Unexpected AutoStart Workflow: Microsoft.SharePoint.SPException: Recursive workflows are not permitted. at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.<>c__DisplayClass1.<AutoStartWorkflow>b__0(SPSite superUserSite, SPWeb superUserWeb)

The Workflow uses the options
- "Start workflow automatically when an item is created"
- "Start workflow automatically when an item is changed"
My environment is:
- MOSS 2010 Enterprise RTM english with german languagepacks
- SharePoint Designer 2010, Version 14.0.4760.1000

Any ideas why this error is occurring and how to resolve it?
Thanks, Stefan.

How to change item user permissions by workflow using item fields


Hi, thats not a question, but solution. I have read a lot of requests about how to perform this task, so here it is.

Code behind will run workflow which will take XXZ and XXY which are user fields and assign their values as "Full acces" and "Design" user permissions to given list item.

This workflow contains two sections. onWorkflowActivated1_Invoked and SetItemPermissionsEx.

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.WorkflowActions;

namespace ITCSharepointAddons.Comm_UpdateItemPermissions
  public sealed partial class Comm_UpdateItemPermissions : SequentialWorkflowActivity
    public Guid webID; 
    public Guid siteID; 
    public Guid listID; 
    public int itemID; 
    public Guid workflowId = default(System.Guid); 
    public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties(); 


How to copy a Column data from one List to another list whenever a new item created .


Hello ,


I have List A and List B

List A


Ticket ID

Column A

Column B

Column C


List B


Ticket ID

Column 1

Column 2

Column 3

I want to copy only Ticket ID from List A to List B , whenever a new item created in List A.

can you please give your thoughts?

how to do it?

Thanks in Advance!


Share Knowledge and Spread Love!

How to assign shortcut keys for menu item of asp.net menu control

I am using asp.net menu control. In window application we assign shortcut key through '&' sign for accessing menu item but in asp.net this is not working and there is not any property for access key for menu items. please give me any suggestion.

Item Level Permission does not work as designed


Here is the problem. 

  1. We have a site with a site members group with created permission level called vnContributor that differs from contributor in that they cannot edit delete items or versions, or create alerts. 
  2. We have a site owners group who have a custom permission level called vnOwner that allows them to add, edit, delete, view, and open items and view versions.  They do not have "Manage Lists" 
  3. The list permission settings were set to view everyone and edit everyone.  In this setting, however members could not see or edit anything, and owners could see and edit everything, regardless of whether it was theirs or not. 
  4. So I changed the list permissions level to edit only their own and changed the members to the OOTB contributor permission level.  I then opened the calendar and added a new item as a user in the members  group.
  5. There was no change.  Members still could not edit their items.  Owners could see and edit everyone's items.
  6. This is not how this is advertised to work. 


Item -level permision for list does not work as it should be.


Wondering if anyone have the same problem like me. I'm currently developing a centrelized document library for the whole company. For the safekeeping of documents, i use List Library  for user to keep all of their document for view but i set the item level permission for the edit access as a "only their own".

This work great a few week ago until i made some changes on the DefaultTemplate on the ..\12\TEMPLATE\CONTROLTEMPLATES. And as for now i found out the item level permision fail to work as what it should be. I do revert the changes on the Default template but still any user still can edit other's document..even with "none" as Edit access permision.

Any help in this matter is highly appreaciated.

Thank you


Item Level Security Using Column Values



Has anyone successfully implemented item-level security in a SharePoint list using column values as the decision criteria? I realize this isn't out of the box functionality and would need to be custom coded.


For example, let's say that we have one document library that stores all of the HR documents about every employee in the company. One of the columns in the properties of the document stores which Office that employee reports to. There are HR staff that support each Office and should only have access to the files of employees who report to the same office that they do.


I know an option would be to create separate library or folder structures for each Office, but I'm curious if anyone has attempted to secure items or documents using properties instead.



Workflow for "Item Created" never runs when Admin creates new item


On all the Workflows I've used in SharePoint 2010 - OOT and SharePoint Designer workflows - I noticed that when the workflow is associated to the "item created" event on a list the workflow never runs if the administrator creates a new item in the list, but it runs if a "normal" user creates an item

Is this by design?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend