0
我需要找出(以编程方式)某个用户配置文件属性使用的术语集,但我无法弄清楚如何执行此操作。任何想法都非常感谢!在SharePoint 2010中获取用户配置文件属性的术语集
我需要找出(以编程方式)某个用户配置文件属性使用的术语集,但我无法弄清楚如何执行此操作。任何想法都非常感谢!在SharePoint 2010中获取用户配置文件属性的术语集
最后想通了:
SPSite site = new SPSite(url);
SPServiceContext context = SPServiceContext.GetContext(site);
var userProfileConfigManager = new UserProfileConfigManager(context);
ProfilePropertyManager profilePropertyManager = userProfileConfigManager.ProfilePropertyManager;
CorePropertyManager corePropertyManager = profilePropertyManager.GetCoreProperties();
CoreProperty property = corePropertyManager.GetPropertyByName(propertyName);
TermSet ts = property.TermSet; // DONE!