Hot answers tagged

23

Create a list view and set the filter; where date time column is not empty (see below)


13

You load multiple items. A conflict occurs. Collect all items you need and call "load". After you call load for all items, then run context.executeQueryAsync. Save your selected items as a global variable (this.items): function showTitles(urlColumnName) { var context = new SP.ClientContext.get_current(); var web = context.get_web(); var lists = web....


12

Go to Advanced Settings and Enable the Allow management of content types. Now you will see the content types associated with the list under the Settings section. Click on Item. Select the column. Check the Required radio button.


9

You can do this in JavaScript by using the SPUtility.js library PS, in this exemple I have used SharePoint 2010, but it's the same with SP 2013 As example I have created a simple list 'sequential number' with: Title (simple text). Occurrence # (simple text), this is our auto increment id Every list has three default forms to add, display and edit ...


8

Modified: Identifies a field that contains the last modified date and time information that is associated with the specified SharePoint Foundation object. Last_x0020_Modified: Identifies a field that contains version control information for the last modified version of the specified SharePoint Foundation list object. The ‘Modified’ column as we see in the ...


8

A little JavaScript employing jQuery does the job just perfectly. $(document).ready( function () { // has to be on an interval for grouped doc libraries // where the actual links are loaded only once a group // is expanded setInterval( function () { $("a[onclick*='return DispEx'][target!='_blank']") .attr("...


7

In the Document Library (or List) settings: Under the section "Content Types" click "Change new button order and default content type" Uncheck "Visible" for the Content Type you want to hide Click OK


5

If you are calling the ItemAdding event, the ListItemId is not going to exist yet. Try using the ItemAdded event instead.


5

Usually the list item ID number is used to do this. I'm not sure how different this is in 2013, but 2010 you would need to edit the form used to add items to the list and add a data connection of type retrieve data from a list, select you list, then select the ID field. Then create a rule to query for the data using the "Query for data" action and select ...


5

I ran into this issue myself just recently. I found a related thread over at Microsoft's forums: https://social.technet.microsoft.com/Forums/office/en-US/c9703b7b-a719-48b4-9350-9d9a75ac62e1/list-item-shared-with-dialog-error?forum=sharepointgeneral The answer for me lied there in one of the suggested answers by the user Martin B. One thing to note, ...


5

The REST API does not have complete support for folders - particularly when it comes to working with list items. While it's quite possible that there is a way to get this to work using the REST API, you're much better off using the Client Object Model in this case. See: SP2013 : Create a list item inside a folder


4

As long as the source and target lists are in the same site collection, you can move them with Manage Content and Structure (_layouts/sitemanager.aspx.


4

You can add these lines of CSS using a content editor webpart to hide the delete button. /* For Dispform.aspx */ a[id="Ribbon.ListForm.Display.Manage.DeleteItem-Medium"] { display:none; } /* For Editform.aspx */ a[id="Ribbon.ListForm.Edit.Actions.DeleteItem-Large"] { display:none; }


4

I had a similar requirement sometime ago. Due to browser compatibility issues, I ended up using window.prompt, shifting the control of the copy/paste functionality over to the user: window.prompt ("Copy to clipboard: Ctrl+C, Enter", text); BTW, the text will already be selected, so the user simply has to press CTRL+C. At the time I believe this is where ...


3

It looks like if you go into Site Settings > Site Permissions > Edit > Permission Levels > Add a Permission Level you can create a custom permission level that lets user do everything but delete an item. Then apply that custom permission level to all the users and groups of the task list.


3

I found the solution. To achieve it via the UI, I go to Site Settings > Site Content Types > click on the custom content type, then click each field and voila!


3

The rule is very simple. Each SPWebApplication has a property which specify how many days the icon should be shown. To get using PowerShell : $wa = Get-SPWebApplication http://sharepoint $wa.DaysToShowNewIndicator


3

Following should give you the Url to the edit form: string editUrl = String.Format("{0}/{1}?ID={2}", properties.WebUrl, properties.List.Forms[PAGETYPE.PAGE_EDITFORM].Url,properties.ListItemId);


3

You should be able to get the SPListItem.URL property of the item in the itemadded event receiver. The URL property gets the site-relative URL of the item. Hope I have understood your question correctly.


3

Some other options would be using a workflow to move data around, assuming it's within the same site collection. You can also use Content and structure to move items from list to list, depending on your SKU. Another option is to use Information Rights Management (IRM). IRM allows you to specify retention times based on dates. When a specific time range ...


3

While there is a ton of guidance out there on the invalid characters topic around SharePoint, I have never seen any that speaks specifically to list item titles. It's mostly related to site, doclib/list, folder, and file names to make sure you don't run into any problems with URLs...here's KB article from Msft on the subject: Information about the ...


3

The XsltListViewWebPart, which is one of the default web parts you can drag onto a form in SharePoint Designer, has an "Auto Refresh" and a "ManualRefresh" property which may get you what you want. Read further below for a script that addresses your question specifically. FWIW, if you create it programatically, I just happen to have a handy snippet: ...


3

You can use Properties.AfterUrl and then split it by "/" and get the last part of string to get document Name. Link to source


3

You can make the content type hidden by using PowerShell: Example: $web = Get-SPWeb -Identity http://aissp2013:111 $list = $web.Lists["TestList"] $list.ContentTypes["TestCT"].Hidden = $true $list.ContentTypes["TestCT"].Update() UPDATE However, the above code or the steps given by @Robert will not hide Content Type dropdown from Edit page. That can be done ...


3

SharePoint contains a hidden Site Column called ItemChildCount. This Site Column stores the calculated number of child items that the folder contains. Note: It does not include the number of subfolders in this count nor does it work recursively and pick up the item counts of subfolders To add the Item Child Count, edit the desired view on your ...


3

After the first query that creates Folder object you could perform the second REST request: http://<sitecollection>/<site>/_api/web/folders/getbyurl(folderrelativeurl)/listItemAllFields to retrieve the associated List Item with a Folder. The following JavaScript example demonstrates that approach: function executeJson(url,method,...


3

You can make use of the SequenceNumber property that is associated with the SPEventReceiverDefinition object. https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.sequencenumber.aspx This property determines the order in which event assemblies execute. This is especially important when there are multiple assemblies that ...


3

Search uses Delete policy for access denied or file not found When the crawler encounters an access denied or a file not found error, the item is deleted from the index if the error was encountered in more than ErrorDeleteCountAllowed consecutive crawls AND the duration since the first error is greater than ErrorDeleteIntervalAllowed hours. If both ...


3

I have seen this happen before (when a programmer without SharePoint knowledge 'fixed' a problem with imported/pasted data and emptied/deleted the existing definition of DropDown values The underlying database stores anything that is written to it, so modern JSOM code can write values to a 'DropDown' field without checking those values actually match with ...


3

It is possible to set or update ReadSecurity or WriteSecurity using REST API and JSOM both. REST API Request body { "__metadata": { "type": "SP.List" }, "ReadSecurity": 2, "WriteSecurity": 4 } End-point /_api/web/lists/getbytitle('{List Name}') You need to make an UPDATE request to above end-point with above request body. I have tested it ...


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