about me

info to be added


2 Responses to “about me”

  1. Hi,

    I am currently trying to retirve all the users from a user field with multiple selection in an event handler….I did the the following but nothing seems to be happening…Can you please give me some advice?
    I think the problem is in the first line but not too sure.

    SPUserCollection userVals = (SPUserCollection)properties.AfterProperties["Team_x0020_Leader"];

    foreach (SPUser userVal in userVals)
    {
    string TLeaderName = userVal.Name.ToString();
    string TLeaderEmail = userVal.Email.ToString();
    string TLeaderLogin = userVal.LoginName.ToString();

    SPRoleAssignment roleAssignment1 = new SPRoleAssignment(TLeaderLogin, TLeaderEmail, TLeaderName, “notes”);
    SPRoleDefinition RoleDefinition1 = newWeb.RoleDefinitions.GetByType(SPRoleType.Administrator);
    roleAssignment1.RoleDefinitionBindings.Add(RoleDefinition1);

    //Check inheritance for Project Manager

    if (!newSubWeb.HasUniqueRoleAssignments)
    {
    newSubWeb.BreakRoleInheritance(true);
    }
    newSubWeb.RoleAssignments.Add(roleAssignment1);
    }

    Thank you

    Kind regards

    Chris Sammut

  2. When you debug is the collection “userVals” filled up?

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.