Hot answers tagged

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.


10

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 ...


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

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


7

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 ...


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 August 2020 Update: In the three years since ...


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

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

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

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-...


3

You can implement OoB Information Retention Policy where you can have the Modified Date greater than or equal to Closing Date. Item should be deleted.


3

You can set up retention policy to start a workflow when any condition (in your case closing data is today) is satisfied. In that workflow you can set step to delete the item. This way multiple items can trigger workflow to do the required functionality.


3

Use Audience Targeting. That's the Out of Box feature available to meet your requirement. Create two separate views. In one view you give access to all groups while for other view you edit the page and in Audience targeting for that particular view, you list down the groups name you want to give access to.


3

This gives you the string label of the version: $objFile.UIVersionLabel This gives you the Major version: $objFile.MajorVersion This gives you the Minor version: $objFile.MinorVersion Edit: The code above works with documents. The following will work with list items: Assuming you have the id of your list item (in your example that is: "x"), you can ...


3

As Rob very correctly mentioned, REST API doesn't have complete support for folders. But using the old /_vti_bin/listdata.svc, you can create a list item and add it inside a folder. For that, you need to set the Path property as server-relative url Try with below code: $(document).ready(function () { function createListItem(webUrl,listName,...


3

As OOTB solution, I suggest doing the following: Create a view for each Garage (Filtered by Garage ID/Name) Create a Promoted Links list. Garage Name, Graghe View URL In Promoted Links list, add a new item for each Garage and its related Garage view URL. In prompted list item, set the permission for each item (Garage) to its Garge Manger. Now every Garage ...


2

You can grant another person permissions to view all items in the list by granting that person Manage Lists permission on your list.


2

SPRecycleBinItem.ID is not same as deletedItem.UniqueID. I have checked it. So you can't use them to identify deleted item in recycle bin. You can expiriment with DirName and LeafName, but there at least 3 different cases: item is folder, item is file, item is ordinary item.


2

A timer job would work great for your situation. Timer jobs are background processes that are run by SharePoint. As the name implies, these can be ran on a schedule, such as every day. This link explains how to create a timer job with detail. For convenience, here is the code. I also provide some basic instruction (link has screen shots if needed). I ...


2

A more recent solution for a SharePoint 2010 website: Select 'All Site Content' (also via Site Actions link at top left) Select your document library Ribbon Bar 'Library Tools', select 'Library' tab Ribbon Bar select 'Library Settings' button Under section 'Content Types', select 'Document' link Under section 'Columns', select your column to change Under ...


2

Another common way of doing it is to create a separate column called "OccurrenceID". Then have a workflow set the value based on a setting list value. Create a separate custom list called "Occurrence Settings." Create a new column called Value (set to single line of text). Create an item (Title: NextOccurenceID, Value: 1) Create a sharepoint list workflow ...


2

Try this function fetchProjectData(projectName, callbackOnSuccess) { var clientContext = new SP.ClientContext("path to site"); var oList = clientContext.get_web().get_lists().getByTitle('Project Overview'); var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml('<View><Query><Where><Geq><FieldRef Name=\'Title\'/&...


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