People picker problem
Hello Guys, When I am auto populating the current user name using javascript into a people picker field. So now user has to just resolve or validate his name. Some users are getting "No exact match found" error. When I move my mouser on to people picker field, It says "multiple entries matched, Click here to resolve". When I clicked on it, it just shows the same user name which appears on top. I know there are no multiple users with the same name. So if I click the name from dropdown, it resolves correctly. It is the same name which was giving me error before. I don't know and I am confused. Its not happening for all users just for few users. Do you guys have any idea?
January 17th, 2011 5:28pm

Please validate the Domain, you can have multiple name, but can be in diferent domain. After select the name with mouse over the name verify the domain in tooltip example: [Domain\Name] Andr Lage Microsoft SharePoint, CRM and Sybase Consultant Blog:http://aaclage.blogspot.com Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/
Free Windows Admin Tool Kit Click here and download it now
January 17th, 2011 6:11pm

Use peoplepicker-searchadforests in stsadm to register your domains/forests for people picker dialog correctly, it could solve your problem. Look at here: http://blogs.msdn.com/b/joelo/archive/2007/01/18/multi-forest-cross-forest-people-picker-peoplepicker-searchadcustomquery.aspx or here: http://suguk.org/blogs/sharepointhack/archive/2009/02/05/16960.aspx _____________________________ Zorayr Zakaryan Lightning Tools
January 18th, 2011 5:11am

But we dont have different domains. We only have one domain. And I am auto filling the user name from the current user who is logged in. So there is no chance the domain name is different.
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2011 10:35am

Hi, Can you post the javascript that you are using to 'auto-populate' the people picker? Paul.
January 18th, 2011 6:05pm

<script type="text/javascript"> _spBodyOnLoadFunctionNames.push("fillDefaultValues"); function fillDefaultValues() { var qs = location.search.substring(1, location.search.length); var args = qs.split("&"); var vals = new Object(getUserDisplayName()); var assignedToInput = getTagFromIdentifierAndTitle("div", "", "People Picker"); if(assignedToInput.innerHTML == '') { assignedToInput.innerHTML = vals; for (var i=0; i < args.length; i++) { var nameVal = args[i].split("="); var temp = unescape(nameVal[1]).split('+'); nameVal[1] = temp.join(' '); vals[nameVal[0]] = nameVal[1]; } } } function getTagFromIdentifierAndTitle(tagName, identifier, title) { var len = identifier.length; var tags = document.getElementsByTagName(tagName); for (var i=0; i < tags.length; i++) { var tempString = tags[i].id; if (tags[i].title == title && (identifier == "" || tempString.indexOf(identifier) == tempString.length - len)) { return tags[i]; } } return null; } function getUserDisplayName() { var tags = document.getElementsByTagName('a'); for (var i=0; i < tags.length; i++) { if(tags[i].innerText.substr(0,7) == 'Welcome') { return tags[i].innerText.substr(8,tags[i].innerText.length); } } } </script> This is the javascript to auto fill the user in the people picker field, which I used.
Free Windows Admin Tool Kit Click here and download it now
January 19th, 2011 11:44am

Ok, so you are grabbing the display name of the user from the from the Welcome link at the top of the page. Not sure if this will solve the problem, but you might like to try the SPServices jQuery library to get the account name of the current user, rather than the display name. That might work a little more reliably. http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPGetCurrentUser Paul.
January 19th, 2011 8:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics