kwizcom banner advertisement

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 "Title" field of the list has link to item and edit menu options in it. If you want to change link to item or edit menu options on any other column of the list - There is no option!
sharepoint change link to item field
Solution: How to change link to item field in SharePoint?
To enable link to item and/or edit menu options on any of the SharePoint list column, follow 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 have the link to DispForm.aspx page of the item!

Set Link to Item or ECB Menu on a particular column in SharePoint 2016:
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 item with edit menu in custom column!
sharepoint change link to item field
Enable "Link to Item" or "Edit Menu" on Any Column of the List in SharePoint Enable "Link to Item" or "Edit Menu" on Any Column of the List in SharePoint Reviewed by Salaudeen Rajack on April 05, 2016 Rating: 5

11 comments:

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

    ReplyDelete
  2. Rajack,

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

    ReplyDelete
    Replies
    1. it Works for sharePoint Online also

      Delete
  3. This Article is really helpful

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

    ReplyDelete
    Replies
    1. I can overcome the disappearing by using JSLinks ... how? Do I paste the line linkToItem="TRUE" into JSLInks?

      Delete
    2. How using JSLinks?

      Delete
  5. Thanks it worked with case sensitive

    ReplyDelete
  6. 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"

    ReplyDelete
  7. When I use both list and link to items it shows the actual link and not the description I gave it??

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

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.