Timeline for Updating 'Created By' field in SP2010 programatically
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 4, 2013 at 13:18 | comment | added | thomius | Read all AD entries (account name + display name + first name + last name) to in-memory list, use that list to search potential duplicates from the import file, email duplicates to business side to resolve them (they need to take the responsibility of errors), and then import? :) | |
Dec 4, 2013 at 12:54 | comment | added | Dushi Sharma | I think I was not able to make myself clear last time. I'll try to be more clear now regarding my question... :) All employees have their unique IDs. But LN stores only display name after we enter user id. So when we export the data to XML file, it will export only Display Name. So my target is to update that Display Name in Created By field of SP using XML file only. I know w/o userId it is not easy (and not the best way to approach) but still I'm trying to find some way. | |
Dec 4, 2013 at 12:49 | comment | added | Robert Lindgren | Yepp, that's why you use unique ID:s ;) | |
Dec 4, 2013 at 12:40 | comment | added | Dushi Sharma | It will take a long time in a big organization like mine where more than 250,000 employees work. | |
Dec 4, 2013 at 12:34 | comment | added | Robert Lindgren | What you would have to do is iterate over all User Profiles, check display name and if a match, use that Users SPUser.Id and SPUser.Name | |
Dec 4, 2013 at 12:30 | comment | added | Dushi Sharma | Okay. I got your point Robert. But there must be some way by which I can do this. | |
Dec 4, 2013 at 12:28 | comment | added | Robert Lindgren | Well, display name i AD is in no way unique, so you can not in a secure way identify a specific user from it. | |
Dec 4, 2013 at 12:28 | comment | added | Dushi Sharma | At this moment I'm not considering uniqueness. I just want SP to somehow match that Display Name from Active Directory. If it is not present in Active Directory then it should update 'Created By' with "System Account". | |
Dec 4, 2013 at 12:23 | comment | added | Robert Lindgren | Then you are in trouble, how the heck would you make sure a display name is unique? ;) | |
Dec 4, 2013 at 12:21 | comment | added | Dushi Sharma | Hi Robert. Thanks for your suggestion. But The problem is that I don't have any userId or userName. I only have Display Name that I'm exporting from Lotus Notes DB to XML file. | |
Dec 3, 2013 at 13:15 | history | answered | Robert Lindgren | CC BY-SA 3.0 |