Tag Info

Hot answers tagged


Change the ConvertLoginName method to: public static SPFieldUserValue ConvertLoginName(string userid) { // Try to get the SPUser value if userid is a user or AD group that has been imported into SharePoint by the UPS. try { SPUser requireduser = _web.EnsureUser(userid); SPFieldUserValue uservalue = new SPFieldUserValue(_web, ...


You haven't shown us what assemblies you are using so it is hard to say if you are missing any or not. That said I just resolved the exact same error by adding: using System.Linq; to my code. Add this to yours if you don't already have it and see if it resolves your issue.

Only top voted, non community-wiki answers of a minimum length are eligible