Skip to content

List Formatting: Is embed action supported for embedding a list item display form(DispForm.aspx) ? #10299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 9 tasks
tecchan1107 opened this issue Jun 11, 2025 · 4 comments
Assignees
Labels
area:docs Category: SharePoint developer/development documentation related area:list-formatting Category: View, row & column formatting with JSON sharepoint-developer-support sharepoint-developer-support

Comments

@tecchan1107
Copy link
Contributor

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

Issue description

To make it easier to quickly check the information of the item referenced by a lookup column, I tried using the embed action to embed the display form of a list item (<ListUrl>/DispForm.aspx?ID=<ItemID>). As a result, the item was displayed successfully.

Image

On the other hand, the documentation states that "the src must specify the url part of the embed code generated by the app (usually found in the src attribute of an iframe element)." Based on this description, I'm unsure whether the display form of a list item qualifies as "embed code generated by the app" and is officially supported.
Is it actually supported?

Image

*When testing this, I used the following code; the <ListName> on line 29 needs to be modified to match your environment.

Lookup Column Formatting Sample
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "display": "flex",
    "flex-wrap": "wrap"
  },
  "children": [
    {
      "elmType": "div",
      "forEach": "_iterator in @currentField",
      "children": [
        {
          "elmType": "div",
          "txtContent": "[$_iterator.lookupValue]",
          "style": {
            "padding": "3px 5px",
            "border-radius": "5px",
            "cursor": "pointer",
            "margin": "5px",
            "white-space": "nowrap"
          },
          "attributes": {
            "class": "ms-bgColor-themeLighter ms-bgColor-themePrimary--hover ms-fontColor-white--hover"
          },
          "customRowAction": {
            "action": "embed",
            "actionInput": {
              "src": "=@currentWeb+'/Lists/<ListName>/DispForm.aspx?ID='+[$_iterator.lookupId]",
              "height": "350",
              "width": "700"
            }
          }
        }
      ]
    }
  ]
}

*Also, I changed the HTML Field Security settings.

Image

@tecchan1107
Copy link
Contributor Author

I’m a bit cautious about this embedding because of the previous issue #8004 .
Sorry to trouble you and for asking several questions.

@Ashlesha-MSFT Ashlesha-MSFT self-assigned this Jun 11, 2025
@Ashlesha-MSFT Ashlesha-MSFT added sharepoint-developer-support sharepoint-developer-support area:list-formatting Category: View, row & column formatting with JSON labels Jun 11, 2025
@Ashlesha-MSFT
Copy link

Hello @tecchan1107,
Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

@Ashlesha-MSFT Ashlesha-MSFT added the area:docs Category: SharePoint developer/development documentation related label Jun 11, 2025
@Ashlesha-MSFT
Copy link

@tecchan1107,
Thank you for raising this.
I’ve reviewed and successfully reproduced the scenario using the "embed" action with a SharePoint list item’s display form (DispForm.aspx?ID=...).
The functionality works as expected — clicking the formatted lookup value opens the embedded display form in a callout.

Image

We'll be informing the engineering teams internally about this discrepancy for further clarification or documentation updates.

@tecchan1107
Copy link
Contributor Author

@Ashlesha-MSFT
Thanks for testing it! I would appreciate it if you could let me know once you find out whether this method is supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Category: SharePoint developer/development documentation related area:list-formatting Category: View, row & column formatting with JSON sharepoint-developer-support sharepoint-developer-support
Projects
None yet
Development

No branches or pull requests

2 participants