Hot answers tagged

17

Alex, This really is one of the more vexing issues of upgrading the branding/master page of a SharePoint site. Please try this solution: I created a javascript file called entityeditor.ie9fix.js, added the javascript code that will follow, and saved it in /layouts/1033. In my master page I added <script type="text/javascript" src="/_layouts/1033/...


11

Here is the solution: [Microsoft.SharePoint.SPUser]$spuser = $spWeb.EnsureUser("domain\username") $spListItem[$newSMTName] = $spuser $spListItem.Update()


11

I found a solution for this problem. below code should be added to ascx file <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" ...


9

I'm working with my PeopleEditor control this way: foreach (var loginName in peopleEditor.CommaSeparatedAccounts.Split(';',',')) { SPUser user = SPContext.Current.Web.EnsureUser(loginName); // user.LoginName is now returns "domain\login" } This code works fine for me. Update: Note 1: EnsureUser will add the user to your site (thanks Ivan Padabed ...


8

Active Directory Import is similar to the Profile import mechanism we had back in SharePoint Server 2007. It's an awful lot easier and quicker to configure than "SharePoint Profile Synchronisation", AKA "User Profile Synchronisation Service" (in services on server) AKA ForeFront Identity Manager (FIM) for SharePoint Server 2010. Enabling AD ...


7

I believe you might also be able to use: SPUtility.ResolvePrincipal(webApp, null, login, SPPrincipalType.User, SPPrincipalSource.All, false); That said, this is slower than the suggestions using EnsureUser, but does have the benefit of not adding the user to the site, and is a bit more flexible, if you need that sort of thing.


7

scenario: when you enter form editing and has some user of this picker people, this is the "oldHtml"? (I'm finding this a bad practice) try using this code: var getIDPeoplePicker=$("div[Title='Column Name of the people picker here']").id; var ppobject = SPClientPeoplePicker.SPClientPeoplePickerDict[getIDPeoplePicker]; var usersobject = ppobject....


6

I havent tried this for claims in SP2010, but in SP2007 this was done for FBA by adding PeoplePickerWildCard element to membership provider in web.config <PeoplePickerWildcards> <clear /> <add key="AspNetSqlMembershipProvider" value="%" /> <add key="fbaMembers" value="%" /> </PeoplePickerWildcards> http://msdn.microsoft....


6

Finally found the solution to my problem. I was trying to set the value of my field to a generic array. What I needed to do was create a generic array, add my user value to it and then convert the array to have the appropriate specific type....FieldUserValue in this case. $userName = "whd\wholland" $spuser = EnsureUser $context $user $...


5

To leverage your work, you can use SharePoint jQuery based library to work with your forms and fields: jPoint - jQuery for SharePoint forms, lists, webparts, and webservices And then you just do: jP.Form.readForm().MyUserField.val();


5

This is my solution: http://blog.vitalyzhukov.ru/peopleeditorand-internet-explorer-9.aspx (in russian). Translated page by Google translator: http://translate.google.com/translate?sl=ru&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fblog.vitalyzhukov.ru%2Fpeopleeditorand-internet-explorer-9.aspx


5

add this code in your .ascx page <SharePoint:PeopleEditor ID="spPeoplePicker" runat="server" Width="350" SelectionSet="User" /> You can also refer to link below. it is showing same problem you have now. there is no difference to take PeoplePicker in SP 2010 and SP 2013. http://social.technet.microsoft.com/Forums/en-AU/sharepoint2010programming/...


5

David, I guess there is a MultiSelect property which you can set to false to allow only a single entry of User/Group For example: PeopleEditor Control - The article is for SP 2007 but I hope its the same in 2013


5

Using JSOM in the past I have experienced this trouble when I have a lack of system resources, specifically when my systems RAM has less than 5% available. The fact that you are getting a Service Activation Exception leads me to believe this may very well be the case, and can be verified in Windows event viewer. Close some applications or disable some ...


4

Here is a plain jQuery example. I can't take credit for it, I believe Marc Anderson came up with it. Just change the column variable with the display name of your column. var columnName = 'Assignee'; // There's no easy way to find one of these columns; we'll look for the comment with the columnName var searchText = RegExp("FieldName=\"" + columnName ...


4

Chrome is not a supported browser. This is not a bug.


4

Where is your code running? Web part, application page etc? Regardless, you can probably do something similar to the following try { //first get the SPGroup you want to add users to SPGroup addToGroup = SPContext.Current.Web.AssociatedVisitorGroup; //now loop through each entity in your user picker foreach (PickerEntity entity in ...


4

Working as designed. :) I discussed this at TechEd last year: http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/OSP308 (about 40 minutes in) The fix is custom development.


4

If you mean the width, you just set the width of the PeopleEditor control. <SharePoint:PeopleEditor Width="300" ID="myppl" runat="server" AllowEmpty="false" MultiSelect="true" />


4

If you just want to add all users, just add NT AUTHORITY\authenticated users If you want to add every user individually, you have to get users (maybe as Principals) from AD, and add them to a group in SharePoint. var principal... var loginName = @"MYDOMAIN\" + principal.SamAccountName; var name = principal.DisplayName; web.AssociatedMemberGroup.Users.Add(...


4

The client object model uses the standard SharePoint security and don't allow you to run with elevated priviledges. Who has access to see members of groups are defined at the group and the default is only members can see who are members. You can change this by going to: Site Actions -> Site Settings -> People and groups -> Click the Groups header in ...


4

In order to check (on the client side) if the value entered in people picker is resolved the following function could be used //Determines If People Picker value is resolved (using jQuery) function IsPeoplePickerValueResolved() { var eEntityData = $("div[id='divEntityData']"); if(eEntityData.length > 0 ) { var isResolved = eEntityData.attr(...


4

Directly the "People Picker" column will not be supported as a lookup in another list. For this scenario, you can create another column of "single line of text" type. Then by using a simple workflow you can update the newly created column with the value from "People Picker column" (Workflow should be triggered on new item added/modified). Now you can refer ...


4

This is what I have been using to get an SPFieldUserValue from the resolved users and groups in a PeopleEditor control. public static SPFieldUserValue GetPeopleFromPickerControl(PeopleEditor people, SPWeb web) { SPFieldUserValue value = null; if (people.ResolvedEntities.Count > 0) { for (int i = 0; i < people.ResolvedEntities.Count;...


4

Get Users from People Picker In the MSDN article you already probably know: http://msdn.microsoft.com/en-us/library/jj713593%28v=office.15%29.aspx In this article you have the function: // Query the picker for user information. function getUserInfo() { // Get the people picker object from the page. var peoplePicker = this.SPClientPeoplePicker....


4

You can compare the token value of the account to determine if it is equal to the one of the system account. Note that in the following you get the SPSite object under elevated privileges and that comparing tokens only works when the actual account in SharePoint is already listed as the system account. SPUser user = <<your code here>> SPSite ...


4

Okay, for anyone else that is interested, I finally figured this out. First my schema:myFields- CC (Group)-- pc:Person--- DisplayName--- AccountId--- AccountType- CCConcat- WorkEmailTo recap, I first added the GetUserProfileByName data connection using Clayton Cobb's awesome instructions here: http://claytoncobb.wordpress.com/tag/getuserprofilebyname/...


4

Use the following code: <script type="text/javascript"> function SetPickerValue(pickerid, key, dispval) { var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">'; xml = xml + PreparePickerEntityXml(key, dispval); xml = xml + '</Entities>'; EntityEditorCallback(xml, pickerid, true); } function ...


4

SOLVED: None of these other answers above worked for me, and I don't know how they would. Here is my brute force method of how I got it to work using jQuery: // Default the Requestor's Name var welcomeText = $('[id*="zz8_Menu"]').text(); // this is zz7_Menu in SP 2007 var user = welcomeText.split('Welcome ')[1]; var counter=0; $('div[title="People Picker"]...



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