0

我在Sp2013中有一个需求前提。我需要为当月的所有员工提供周年纪念日。 我有代码为当前用户提取数据。我需要所有用户的帮助,这些用户的周年纪念属于当月。任何帮助表示赞赏。从用户配置文件获得本月所有员工周年纪念+ SP2013

var url = _spPageContextInfo.siteAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties"; 

$.ajax({ 

    url: url, 
    type: "GET", 

    contentType: "application/json;odata=nometadata", 
    headers: { Accept: "application/json;odata=verbose" }, 
    success: function (data) { 
     try { 
      //Get properties from user profile Json response 
      userDisplayName = data.d.DisplayName; 
      AccountName = data.d.AccountName; 
+0

这将适用于您。 http://stackoverflow.com/questions/21548279/how-to-get-with-sharepoint-client-apis-all-user-profiles – Vaibhav

回答

1

CSOM将为Per用户提供方法。所以在你的情况下,如果你想获得每个用户的周年纪念,那么你需要先获得网站集中的所有用户,然后遍历它们以获取用户个人资料并获得周年纪念日的领域。 @vaibhav建议有一个如何实现这个的例子。

寻找最upvoted答案

感谢

相关问题