access sharepoint group item columns

旧街凉风 提交于 2019-12-25 04:42:35

问题


if we want to access a sharepoint list and get data in a item we can access like this:

    foreach (SPListItem item in itemcoll)
    {            
        string modified = item["Modified"].ToString();
    }

Similarly, to access a Sharepoint Group SPGroup programmatically, how to do this? I want the modified column value for each user who joined a spgroup.


回答1:


Your question is about querying information of some user in some group. In particular you are interested in the "modified" date of the user or when he/she joined a particular group.

I don't think there is a field for "join date" of a group, but you can query the extended information on users (department, presence etc.) by querying the hidden "User Information list".

First to get users by group you can refer to the following post: get users by group in sharepoint.

And to query the user information list you can follow either one of these links:

  • SharePoint's hidden user-list - User Information List
  • WSS – Get User Profile Details Programmatically


来源:https://stackoverflow.com/questions/4075418/access-sharepoint-group-item-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!