Tag Info

New answers tagged

0

Eventually, I gave up and did it manually. Since the field was just a text field linked to a person/group picker in an InfoPath form, it was a bit more difficult than I hoped. To do it manually, I just opened the XML files for the forms and deleted any instances of DOMAIN\.


1

Ok after a little messing I managed to get this to work. Despite having a publishing site I still had to set up my site and also the active directory connection and synchronisation service. With those items in place the Internal Server error 500 vanished and the data was displayed. Thanks to everyone for their help in getting to the bottom of this, a ...


0

Try using the below URL : _spPageContextInfo.webServerRelativeUrl+ "/_api/SP.UserProfiles.PeopleManager/GetMyProperties If you still do not get the code working try accessing the URL in the browser http://yoursite.yourdomain.com/_api/SP.UserProfiles.PeopleManager/GetMyProperties and see if the results are returned. If you get a feed reading ...


2

How to delete SP.Group in SharePoint 2013 via JSOM Use SP.GroupCollection.remove, SP.GroupCollection.removeById or SP.GroupCollection.removeByLoginName methods to remove Group from site. Example var context = SP.ClientContext.get_current(); var groups = context.get_web().get_siteGroups(); groups.removeById(groupId); context.executeQueryAsync( ...


1

Okay so... turns out this is just something that SharePoint 2013 can't handle. I had to resort to filling out a list with my users and attaching a lookup field to the list. It's not as UI friendly, but at least it works... for now.


1

SP.UserProfiles.PersonProperties.userProfileProperties property returns an a dictionary of property name keys and their string values. In JavaScript you could use the following syntax to access value in a dictionary: myProperties.get_userProfileProperties().UserName or myProperties.get_userProfileProperties()['UserName'] Example var context = ...


0

Using get_lookupValue() should work. If you're reading out a multi user it's slightly different too. //Get user field value var peopleVal = item.get_item('People').get_lookupValue(); //Get multi user field value var peopleVals = item.get_item('People'); for(var i = 0; i < peopleVals.length;i++) { var userName = peopleVals[i].get_lookupValue(); ...


1

You can find the Groups for an User using the Web Service GetGroupCollectionFromUser. SPServices can help you; but it's using jQuery. Same thing with SharepointPlus. You'll have to send a SOAP envelope (XML) to the Web Service. The body of your AJAX request will look like that: var body = "<soap:Envelope ...



Top 50 recent answers are included