خاصية MOSS2007 UserProfile: الوصول البرنامجي إلى "السمة المعينة" في الإعلان

StackOverflow https://stackoverflow.com/questions/3103243

  •  29-09-2019
  •  | 
  •  

سؤال

كما تعلم ، يوفر Moss 2007 وظائف لمزامنة خصائص Active Directory لخصائص SharePoint Userprofile. يمكنك تعيين خصائص الإعلان إلى خصائص المستخدم في الخدمات المشتركة> ملف تعريف المستخدم وخصائصها> عرض خصائص ملف تعريف العرض (على طول الطريق في الأسفل).

أقوم حاليًا بالتحقيق في إمكانية مزامنة التعديلات على userprofiles مرة أخرى إلى م.

أنا جديد على SharePoint وأكافح طريقي من خلال واجهة برمجة التطبيقات الخاصة به ، لكن ما قمت بحفره حتى الآن ، هو أنه يمكنك التكرار لتغييرات المستخدمين ومعرفة الطابع الزمني والقيم القديمة والقيم الجديدة ، إلخ.

    string siteUrl = @"http://[siteUrl]/";
    Microsoft.SharePoint.SPSite spsite = new Microsoft.SharePoint.SPSite(url);
    Microsoft.Office.Server.ServerContext serverContext = Microsoft.Office.Server.ServerContext.GetContext(spsite);
    Microsoft.Office.Server.UserProfiles.UserProfileManager userProfileMgr = new Microsoft.Office.Server.UserProfiles.UserProfileManager(serverContext);
    var collection = userProfileMgr.GetChanges();

    List<ProfilePropertyChange> changes = new List<ProfilePropertyChange>();
    foreach (Microsoft.Office.Server.UserProfiles.UserProfileChange change in collection)
    {
        if (change.ObjectType == Microsoft.Office.Server.UserProfiles.ObjectTypes.SingleValueProperty)
        {
            var singleValue = change as Microsoft.Office.Server.UserProfiles.UserProfileSingleValueChange;

        string oldValue = singleValue.OldValue;
        string newValue = singleValue.NewValue;
        var profileProperty = singleValue.ProfileProperty;
        DateTime modificationDate = singleValue.EventTime;

        ...

        }
    }

ومع ذلك ، فإن ما لا يمكنني اكتشافه حاليًا ، هو الوصول البرنامجي إلى ما يسمى "السمة المعينة" (اسم الخاصية الأصلية في م).

هل يمكن لأي شخص أن يوجهني إلى واجهة برمجة تطبيقات SharePoint التي ستعيد هذه المعلومات بالنسبة لي؟

شكرا جزيلا

هل كانت مفيدة؟

المحلول

كان ستيف كوران لطيفًا بما يكفي لمعالجة سؤالي في منتدى MSDN:

http://social.msdn.microsoft.com/forums/en-us/sharepointdevelopment/thread/019c1e60-babb-4942-90e1-d33e924c7c73

باستخدام PropertyMapCollection ، قد تكون قادرًا على البحث عن سمة الإعلان المعينة بالنظر إلى اسم المستخدم.

datasource ds = upcm.getDataSource () ؛ PropertyMapCollection PMC = DS.PropertyMapping ؛

http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.propertymapCollection٪28Office.12٪29.aspx

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top