Record Summary link in email

Hi, 

I have a requirement of including the link of a request's record dashboard summary view in the email body. When clicked, the link should open the summary dashboard for that particular request ID. Any way to  implement this? 

Thanks!

  Discussion posts and replies are publicly visible

Parents
  • Hi there,

    I have a solution for your problem. There isn't any straight forward way but this can be achieved with a little hack. You will have to generate the URL of the record from the recordLink function and then do some manipulation on the output string to make a working url. I am adding a code snippet below. You can try using this.

    a!localVariables(
      local!recordRef: tostring(
        a!recordLink(
          recordType: cons!RECORD,
          identifier: 1,
          
        ).@attributes.@anyAttribute._recordRef
      ),
      local!recordLink: concat(
        "https://yourEnvironmentUrl.com/suite/tempo/records/item/",
        local!recordRef,
        "/view/summary"
      ),
      local!recordLink
    )

    In this code, you can make certain things dynamic like identifier, your environment Url.
    I hope this helps.

    Thanks
    -Harshit Bumb

  • I use the following rule to create a record link URL for use with the SafeLink feature and keep the new tab inside the Site context.  It's very slightly tricky to always provide the Site Context (i.e. the site URL stub), but when you can, it's very functional.  An additional advantage here is you don't need to hack into the back-end value of a!recordLink (though it is fun to do that kinda stuff).

    This rule, i.e. rule!GLOBAL_Utility_getSiteRecordURL, will take in a recordType, record Id, site context string, optional site page context (to open the target record on a specific Site tab), and optional dashboard stub (to open the record on a particular View).  If no Site Context is provided, it defaults to the Tempo record link; and if no record ID is provided, it defaults to the Tempo Record List (per the behavior of urlForRecord()).

    Code:

    a!localVariables(
      local!defaultURL: urlforrecord(ri!recordType, ri!recordId),
      local!addSiteContext: if(
        isnull(ri!siteContext),
        local!defaultURL,
        if(
          isnull(ri!recordId),
          /* Can't link to a record list in sites context */
          local!defaultURL,
          substitute(
            local!defaultURL,
            "tempo/records/item",
            "sites/" & ri!siteContext &
            if(
              isnull(ri!sitePageContext),
              "",
              "/page/" & ri!sitePageContext
            ) &
            "/record"
          )
        )
      ),
      local!addDashboardContext: if(
        isnull(ri!dashboardStub),
        local!addSiteContext,
        substitute(local!addSiteContext, "summary", ri!dashboardStub)
      ),
    
      local!addDashboardContext
    )
    
    /* by: Mike Schmitt */

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    HI Mike,

    I understood only these Rule Inputs i.e ri!recordType, ri!recordId  .

    What to use in the other one and of which type . Please explain

  • 0
    Certified Lead Developer
    in reply to saurabh sharma

    Can you clarify what you mean?

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    I mean to say that the rule inputs which you are using . That is ri!siteContext and ri!sitePageContext , ri! dashboardStub . What type of inputs I have to give to these rule inputs .

Reply Children
No Data