none
LinkToItem not working for any column RRS feed

  • Question

  • I'm trying to remove the title column with another one and make it act like the original Title column. In that it will be clickable to go to item view and have the ellipses for editing, workflow etc.

    ListToMenu="TRUE" works fine for getting the ellispses to show up on that column. However LinkToItem="TRUE" does nothing. 

    Any ideas on how to make this work on Sharepoint 2013


    Jonathan Sheely


    • Edited by Jonathan Sheely Thursday, July 18, 2013 6:13 PM Added sharepoint version
    Thursday, July 18, 2013 6:12 PM

Answers

  • So debugging the clienttemplates.js I discovered that it's a case sensitivity bug

    The clienttemplates.js is looking for linkToItem!=null not the upper cased LinkToItem so changing my FieldRef too to a lower case l worked.

    <FieldRef Name="Account_x0020_Number" ListItemMenu="TRUE" linkToItem="TRUE"  />


    Jonathan Sheely

    Friday, July 19, 2013 6:20 PM

All replies

  • Hi Jonathan, have you tried going into the list settings and making your new title column linked to item with edit menu? That will make your column act like the title column.


    cameron rautmann

    Thursday, July 18, 2013 7:34 PM
  • Cameron,

    I'm not sure what you mean by making my column linked to item with edit menu? Do you mean using a Lookup field?

    As long as I can enter custom data in to my field and have it be linked to the edit form I'm happy. 


    Jonathan Sheely

    Thursday, July 18, 2013 8:23 PM
  • Hi,

    I understand that you want to add link on other list column to link to display form for the item. You can add these code in the fieldref like this:

    <FieldRef Name="column1" LinkToItem="TRUE" ListItemMenu="TRUE"/>

    For more information about achieving this using powershell, please refer to this site:

    Simple Concept: List View How to add context menu to the column?: http://sharing-the-experience.blogspot.in/2013/05/simple-concept-list-view-how-to-add.html

    Thanks,

    Entan Ming

    Entan Ming
    TechNet Community Support

    Friday, July 19, 2013 11:06 AM
    Moderator
  • Entan,

    So I've done that. But the ListItemMenu works to add the [...] link list after the column but the LinkToItem option has no effect in Sharepoint 2013?

    Ideas?


    Jonathan Sheely

    Friday, July 19, 2013 4:28 PM
  • I assume I'm making the change in the correct location under the Asp:Content>WebPartPages:WebPartZone>ZoneTemplate> XmlDefinition>View>ViewFields node

    <FieldRef Name="Account_x0020_Number" ListItemMenu="TRUE" LinkToItem="TRUE" LinkToItemAllowed="Required"  />
    I'm using the AllItems.aspx view in order to make these changes. Am I missing something?


    Jonathan Sheely

    Friday, July 19, 2013 4:34 PM
  • The issue appears to be 

    <JSLink>clienttemplates.js</JSLink>

    If I remove that then the LinkToItem works but the format is obviously messed up. How do I go about modifying that file and/or cloning/overriding it in another file?


    Jonathan Sheely

    Friday, July 19, 2013 6:15 PM
  • So debugging the clienttemplates.js I discovered that it's a case sensitivity bug

    The clienttemplates.js is looking for linkToItem!=null not the upper cased LinkToItem so changing my FieldRef too to a lower case l worked.

    <FieldRef Name="Account_x0020_Number" ListItemMenu="TRUE" linkToItem="TRUE"  />


    Jonathan Sheely

    Friday, July 19, 2013 6:20 PM
  • Works with ListItemMenu="TRUE" without the need for lower case. Ensure that ListItemMenu="TRUE" in the field definition.

    <Field Name="Account_x0020_Number" LinkToItem="TRUE" ....(more field definition stuff)

    Wednesday, December 11, 2013 6:37 PM
  • So debugging the clienttemplates.js I discovered that it's a case sensitivity bug

    The clienttemplates.js is looking for linkToItem!=null not the upper cased LinkToItem so changing my FieldRef too to a lower case l worked.

    <FieldRef Name="Account_x0020_Number" ListItemMenu="TRUE" linkToItem="TRUE"  />


    Jonathan Sheely

    Good answer that save my day thank you (y)
    Thursday, November 27, 2014 9:18 AM
  • Thanks a lot. Worked for me.
    Monday, July 6, 2015 4:37 PM
  • So debugging the clienttemplates.js I discovered that it's a case sensitivity bug

    The clienttemplates.js is looking for linkToItem!=null not the upper cased LinkToItem so changing my FieldRef too to a lower case l worked.

    <FieldRef Name="Account_x0020_Number" ListItemMenu="TRUE" linkToItem="TRUE"  />


    Jonathan Sheely

    This one works perfectly for me.
    Wednesday, October 18, 2017 5:29 AM