Link (<a>) to current entity in email template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • salvix
    Junior Member
    • May 2019
    • 20

    Link (<a>) to current entity in email template

    Hello, when creating a notification from a workflow I can use {entity} to reference the current entity.
    How can I do this from an email template?
    I've even tried using a link < a href="Good.ID">{Good.Name}< /a>. This gives me the correct name but not the ID, which stays as {good.ID} in href:
    Code:
    <a href="https://crm.mycrm.com/#Good/view/%7BNotificacion.ID%7D">GOOD 2020-0001</a>
    Thank you.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi salvix,
    Last time I used it in email template this way:
    HTML Code:
    <a href="https://crm.mycrm.com/#Good/view/{Good.ID}">{Good.Name}</a>

    Comment


    • salvix
      salvix commented
      Editing a comment
      Yes, that was I tried. But it escapes { and } before parsing it. Perhaps it's a bug or a security feature to avoid sql injection.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #3
    You need to open a code view (</> button) and add this code to it. Don't add it as plaintext. Also the 'Is Html' checkbox should be 'true'.

    Comment


    • salvix
      salvix commented
      Editing a comment
      Yes, I did it so. First with the option to insert link and then editing the html code.
      I was also marking up isHTML.
      Everything works fine, except that.
      Last edited by salvix; 07-07-2020, 08:39 AM.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #4
    Do you use {Good.Name} and {Good.Id}? Try this: {Good.name} and {Good.id}. Use placeholder insert functionality to get a proper placeholder.

    Comment

    • esforim
      Active Community Member
      • Jan 2020
      • 2204

      #5
      Shouldn't it be {good.Name} since first letter is always lower case (not sure about your other letter)

      Comment


      • salvix
        salvix commented
        Editing a comment
        Hi Maximus, I traced parseText in EmailTemplate and found the error. ID must be in lowercase.
        Thank you for your time.
    Working...