Creating dynamic link in Docx From Dynamic Template

Certified Senior Developer

Hello Everyone, 

I am trying to show a hyperlink field in a word document which generates from 'Docx from dynamic template', the URL for the hyperlink will be dynamic passed from a rule. I tried using the merge field logic to show dynamic hyperlink but couldn't find a solution. The link always redirects to downloads/URL something like - C:\\Users\Downloads\mergeField. I would like to know if there is a way to link a dynamic URL. Thanks in advance.

I tried the merge fields based on the blog below, but it didn't work.

blog.softartisans.com/.../

The hyperlink is always redirecting to downloads as shown below.

Tejaswi

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Associate Developer
    You need to create a hyperlink with a merge field in docx and then need to pass the link value in XML:
    Create hyperlink with merge field in docx:
    • Create Hyperlink
    • Replace the link with the merge field

    Steps:

    1. Create a hyperlink
    2. Select the inserted hyperlink and press Shift+F9
    3. Replace everything in the field after 'HYPERLINK' with mergefield
    4. Select the field and press F9 to update the display

    The merge field should look like the following:
    XML:
    <linkUrl>www.google.com</linkUrl>
    I hope this helps.
Reply
  • +1
    Certified Associate Developer
    You need to create a hyperlink with a merge field in docx and then need to pass the link value in XML:
    Create hyperlink with merge field in docx:
    • Create Hyperlink
    • Replace the link with the merge field

    Steps:

    1. Create a hyperlink
    2. Select the inserted hyperlink and press Shift+F9
    3. Replace everything in the field after 'HYPERLINK' with mergefield
    4. Select the field and press F9 to update the display

    The merge field should look like the following:
    XML:
    <linkUrl>www.google.com</linkUrl>
    I hope this helps.
Children