Record Link URL in Email of a User

Certified Senior Developer

Hi All, 
I have a scenario where I want to open a site with the record data context thought a mail sent to a user. 
The user will click on the site URL present in the mail and then he will be directly navigated to the exact context of the record data and the page where he want to go with the record data.
Can we achieve this identifier scenario for a recordtype based site URL?

  Discussion posts and replies are publicly visible

Parents
  • This is a dirty workaround I invented back before we were able to force record links to open in a new tab, but I assume it should work for your use case.  Note that since it manually reconstructs the site-based Record URL, and that is semi-unsupported functionality, the way this works will be subject to change in the future with no notice when Appian changes anything in their back-end.

    rule!UTILITY_getSiteRecordURL()

    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 */

Reply
  • This is a dirty workaround I invented back before we were able to force record links to open in a new tab, but I assume it should work for your use case.  Note that since it manually reconstructs the site-based Record URL, and that is semi-unsupported functionality, the way this works will be subject to change in the future with no notice when Appian changes anything in their back-end.

    rule!UTILITY_getSiteRecordURL()

    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 */

Children
No Data