1

I'm new to the forum and joined because despite my best efforts at searching I can't find an answer so hoping someone can help me out.

I have a SharePoint list with a Person column. This column is formatted with JSON so an email icon appears beside the name and the user can click it and send an email.

This works fine including the data from the list item I want in the email but I really need it to be able to have a hyperlink back to that item so the email recipient can just click and go there rather than having to navigate back to the list and find the item?

Is this doable?

I've tried inserting href code but just get errors.

"href": "= @currentWeb + '/Lists/Change%20Request%20Workflow/AllItems.aspx?ID=' + [$ID]"

Actual JSON being used below:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "span",
      "style": {
        "padding-right": "8px"
      },
      "txtContent": "@currentField.title"
    },
    {
      "elmType": "a",
      "attributes": {
        "iconName": "Mail",
        "class": "sp-field-quickActions",
        "href": {
          "operator": "+",
          "operands": [
            "mailto:",
            "@currentField.email",
            "?subject=A Change Request has been logged",
            "&body=You have been assigned as 1st Reviewer for this Change Request:",
            "\r\n",
            "\r\n",
            "# ",
            "[$ID]",
            " - ",
            "[$Title]"
          ]
        }
      }
    }
  ]
}

1 Answer 1

0

It is not possible to add hyperlink in email body as you are using mailto which does not support using HTML in email body.

Section 2 of RFC 2368 says that the body field is supposed to be in text/plain format, so you can't do HTML.

However even if you use plain text it's possible that some modern mail clients would render a URL as a clickable link anyway, though.

Source:

  1. Is it possible to add an HTML link in the body of a MAILTO link [duplicate]
  2. mailto link with HTML body
2
  • Thanks. maybe I can just add in the url text and Outlook might render it anyway.
    – Chris
    Sep 5, 2022 at 1:34
  • Try it & let us know if it works for you. Sep 5, 2022 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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