A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Hot answers tagged

1

This is problematic in Sharepoint as the platform doesn't have an field security concept build in (you would have to use Dynamics CRM for it) there is no real way around it. You can create an smoke and mirror solution but when stored in one list it is impossible to fully block users (they could use web service call, PowerShell PnP to go around you form). ...


1

For GeoLocationField: Assuming you have fetched the list items you want to update in oListItem then try something like below: FieldGeolocationValue oGeolocationValue = new FieldGeolocationValue(); oGeolocationValue.Latitude = (double)17.4; oGeolocationValue.Longitude = (double)78.4; oListItem["Address"] = oGeolocationValue; oListItem.Update(); context....


1

This is really more of a general JavaScript question than SharePoint-specific, but the easiest way is just to use an array variable: var itemprices = []; and then push the values as you find them itemprices.push(oListItem.get_item('Price'));, and then you can loop through your array when you want to do something with each Price. Alternatively, you could use ...


1

<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>{PUT YOUR LOOKUP ITEM ID HERE WITHOUT THESE CURLY BRACES}</Value></Eq></Where></Query></View>


1

You can use the below code to set validation for a list field using JSOM, $(document) .ready(function() { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', SetValidation); }); varoList, clientContext; function SetValidation() { //Get client context ,web and list object clientContext = new SP.ClientContext....


1

Use SP.SOD.executeFunc('clientpeoplepicker.js', 'SPClientPeoplePicker', function () { var neededPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[GiveTheIndexHere]; var usrObj = { 'Key': 'i:0#.w|domain\user' }; neededPeoplePicker.AddUnresolvedUser(usrObj, true); }) Adding my complete code below. The requirement was to auto-populate ...


1

Try using below code: //Display name of your field var fAssignedTo = "Assigned To"; $(document).ready(function(){ BindPeoplePickerWithLoggedinUser(fAssignedTo); }); function BindPeoplePickerWithLoggedinUser(ppTitle){ setTimeout(function(){ var _PeoplePicker = $("div[title='" + ppTitle + "']"); var peoplePickerEditor = ...


1

Users who are granted with Contribute, Read or lower permissions will not be able to “Add column”. The button will still be visible to the users, but they can only show or hide columns. If they try to save the modified view as a public view, they will get “Access Denied” error. You can check user permissions via https://{siteURL}/_layouts/15/user.aspx and ...


1

The problem is that the "Members" group by default is granted the "Edit" permission level, and "Edit" is not what you think it is. The "Edit" permission level specifically grants users the rights to "Add, edit, and delete lists; view, add, update, and delete list items and documents. By default, this permission level is assigned to the Members group." ...


1

You could try below nth:child to apply the CSS. My test demo: <style type="text/css"> table.ms-listviewtable tr th:nth-child(4) { display: block; width: 160px !important; white-space: pre-wrap; word-wrap: break-word; } table.ms-listviewtable tr td:nth-child(4) { ...


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