0

I try to configure in MS Sharepoint a list with about 20 items. It works so on. Example: First Name, Name, Phone, Office, Acronym, etc.

Now I would like to set up the list for about 3 teams/persons.

Team 1: When team 1/or Person1 wants to create a new item, they can only see First Name, Name and acronym.

Team 2: When team 2/or Person2 wants to create a new item, they can only see First Name, Name, and Office.

Team 3: When team 3/or Person3 wants to create a new item, they can see the whole list.

It doesn't work with different views. I thought it is easier to send them E-Mails with different views. So I send different links with the individual views and they the in the beginning the items I've listed above but if they add a new item, they see the whole list. (The different teams/users are created by me, so I can test all day long)

Does anyone have a solution for this issue? I searched hours but I didn't found anything...

0

(1) You have to give column level permissions. There are some third party tools available for column level permissions:

(2) You can create Custom NewForm Webpart

  • Custom Webpart will hide/show appropriate column texts(controls) as per user permissions.
  • Create 3 SP Groups Team1, Team2, Team3
  • Write code to check the users in groups and display controls on webpart as per the group.
  • Replace this new custom webpart with existing list NewForm.aspx with this webpart. So, whenever you click on list new item button, it will open this custom webpart rather than default new form.
  • Write following code on FeatureActivated or where ever you want to change list's default new form. Here is the code which will run on FeatureActivated:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPWeb currentWeb = (SPWeb)properties.Feature.Parent;
            try
            {
            //listname1 = YourListName
            SPLimitedWebPartManager NewForm = currentWeb.GetLimitedWebPartManager("Lists/listname1/NewForm.aspx", System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
            AddWebPart(NewForm);
            }
            catch (Exception)
            {
                throw;
            }
          }
protected void AddWebPart(SPLimitedWebPartManager MainPage)
    {
        MainPage.WebParts[0].Hidden = true;
        MainPage.SaveChanges(MainPage.WebParts[0]);
        try
        {
            var linqqry = from wp in MainPage.WebParts.Cast()
                          where wp.GetType() == typeof(Webpart1.Webpart1)
                          select wp;

        if (linqqry.Count() == 0)
        {
            //Create an instance of WPMenu Webpart and add in a Webpart zone
            Webpart1.Webpart1 wpWebPart = new Webpart1.Webpart1();
            MainPage.AddWebPart(wpWebPart, "Main", 0);
            MainPage.SaveChanges(wpWebPart);
        }
        }
        catch (Exception ex)
        {
        }
}
  • Thank you for your answer, I will try this and I will update you soon again. – Doranito Oct 17 '16 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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