Enable “Link to Item” or “Edit Menu” on Any Column of the List in SharePoint

Requirement:
There is a list called “Projects” where the default title filed made hidden, and now the problem is: User wants to have the link to View Item on “Project Name” field. By default, the “Title” field of the list links to the item and edit menu options in it. If you wish to change the link to the item or edit menu options on any other column of the list – There are no options!
sharepoint change link to item field

To enable the link to the item and/or edit menu options on any of the SharePoint list columns, follow the below steps:

  • Open your List view page in SharePoint Designer using “Edit File in Advanced Mode”
  • Search for <ViewFields> Tag. Pick the appropriate field to have link to item functionality
  • Add: LinkToItem=”TRUE” to it. If you want to have Edit Menu, then add: ListItemMenu=”TRUE” or you can add both.E.g.
<FieldRef Name="ProjectName" LinkToItem="TRUE" ListItemMenu="TRUE" />

 sharepoint link to item with edit menu
Save and close the page. Now, if you go back to your view, the “Project Name” field will link to the DispForm.aspx page of the item!

While the above solution works on both SharePoint 2010 and in SharePoint 2016, found the same “LinkToItem” doesn’t work on SharePoint 2016, but “linkToItem” works (case-sensitive!)

<FieldRef Name="ProjectName" linkToItem="TRUE" ListItemMenu="TRUE" />
link to item with edit menu sharepoint change

Here is the result in action: link to the item with edit menu in custom column!

sharepoint change link to item field

PowerShell to Enable Context Menu on a Column

We can set the property to enable the context menu of a specific column with PowerShell:

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
 
#Set Configuration Parameters
$WebURL = "https://intranet.crescent.com/sites/Audit/"
$ListName = "LPRequest"
$FieldName="Assigned To" #Display Name of the Field
 
#Get the Web, List, Item and User objects
$Web= Get-SPWeb $WebURL
$List= $web.Lists[$ListName]
 
#Get the column from List
$Field = $List.Fields[$FieldName]

#Update Field Settings
$Field.ListItemMenu = $True
$Field.ListItemMenuAllowed = "Required"
$Field.Update()
$List.Update()

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

17 thoughts on “Enable “Link to Item” or “Edit Menu” on Any Column of the List in SharePoint

  • I have a document library in Modern XP on prem where I was able to make the Title column linked to the document along the name column. We do not use SP Designer. I have not able to reproduce this in any other document library. Any clue?

    Reply
  • Just an update to this feature when using SP Designer – it only works in SPO if the list is in Classic Experience. It will not work in the Modern Experience.

    Reply
  • Hi All, does anyone know how to move an item into a folder? I am able to make folders within the list, but not able to move any item into it.

    Thanks a lot

    Reply
  • How to enable custom link to sharepoint list column instead default link in sharepoint 2013?

    Reply
  • My company has restructured access to SharePoint Designer. Is there anyway to achieve the “Link to Item” functionality via the SP Online UI?

    Reply
  • What is needed for SharePoint 2013? Neither TRUE statements work, just gives the full http link instead of the description name?

    Reply
  • When I use both list and link to items it shows the actual link and not the description I gave it??

    Reply
  • Thanks alot, it worked like charm. There is multiple sites that points that linkToItem=”TRUE” alone does the trick, but in our case it required also ListItemMenu=”TRUE”

    Reply
  • Thanks it worked with case sensitive

    Reply
  • It will work for SharePoint Online also but once you do any changes in the view in UI or simply opening and saving the view in browser will make the linkToItem=”TRUE” to disappear. This the default behavior in SharePoint Online. You can overcome this by using JSLinks.

    Reply
    • I can overcome the disappearing by using JSLinks … how? Do I paste the line linkToItem=”TRUE” into JSLInks?

      Reply
  • This Article is really helpful

    Reply
  • Rajack,

    Does this work in SharePoint Online also? I don’t see my column names the way you do.
    Thanks,
    Peter

    Reply
    • it Works for sharePoint Online also

      Reply
  • Hi Rajack,

    Your post is great, but I have one question here, I have used the exact same properties over the field I want to have a link and a menu but I’m experiencing an interesting problem at the list there.
    After a while, not sure the exact reason the property set over that field linkToItem=”TRUE” is disappearing, ListItemMenu=”TRUE” is there, only linkToItem missing.
    Very interesting bug or case, not sure what’s happening and triggering such a thing.
    Any idea why ?
    Thanks,
    Jovica

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *