0

I have two lists:

ListA
    Title
    Description

ListB
    Title
    ListA Lookup

Both lists have custom display forms. In the ListB display form, I'm using a SharePoint:FormField to display a link to the currently selected ListA item. The link, however, does not point to the correct default display form. I have verified that the form works and that if you go to the ListA view and select View Item, it displays in the proper default form. Am I doing something wrong here or missing something?

The SharePoint:FormField I'm using to display is:

<SharePoint:FormField runat="server" id="ff11{$Pos}" ControlMode="Display" FieldName="Assessment" __designer:bind="{ddwrt:DataBind('u',concat('ff11',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Assessment')}"/>

The link that is generated from this is https://mysite/Lists/Assessments/DispForm.aspx?ID=12345, rather than the _layouts/15/listform.aspx suggested below.

  • What's the version of your SharePoint server, 2007,2010 or 2013? – JoannaW_MSFT May 3 '18 at 1:56
  • 2016 on-premises. – DrewB May 7 '18 at 11:09
0

What have you done on the SharePoint:FormField?

In SharePoint lists/libraries, once the lookup item link is clicked your get redirect to a page with the following url:

/_layouts/15/listform.aspx?PageType=4&ListID={ListID}&ID={ItemID} 

The PageType defines whether it’s the display or editform for the item, 4 means display form.

By default, it will open the default display form for the lookup item.

Clear the cache and re-open the site, try it again.

  • Thanks for the suggestion. I've cleared all the caches I could think of, restarted all the machines involved and it's still generating an incorrect link. For now, I just added a javascript that examines all the links on the page and substitutes the correct link for the incorrect one. It'll get the site out the door until I can figure out what's going on. – DrewB May 2 '18 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.