Happy Business Starts Here

Re: Hyperlink inside IF condition in Invoice template

Rajkumar
Zuora Support

Hyperlink inside IF condition in Invoice template

Question:

 

Hi there - I'm trying to add a hyperlink to an external website in our invoice template and am running into issues. I believe I've added the hyperlink into the template correctly, but when I preview an invoice PDF that link is not clickable.

 

Answer:

 

Unfortunately, using Hyperlinks inside the IF statement won't work as expected even though it shows as a Hyperlink in the rendered PDF, it is just a plain text value. 

 

This is not a limitation from the Zuora side but from the Microsoft side itself as it owns the Word mail merge functionality.

 

There are several forums discussing the same issue as below:

 

Using of Hyperlinks outside the IF condition works always as expected.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 REPLY 1
Rajkumar
Zuora Support

Re: Hyperlink inside IF condition in Invoice template

The workaround for this requirement is as below:

 

We can use a custom field to store the Hyperlink value in that and refer to it in the template.

In the template, refer to the field as a normal merge field instead of a Hyperlink type.

Template Sample:

In the 1st line, I made the custom field "Underlined" and print it in Blue Color. In the 2nd line, I directly implemented the Hyperlink.

Rajkumar_0-1614755743673.png


PDF Output:

As we can see in the below screenshot, the entire URL will be displayed in the 1st line and it will navigate to the respective URL when we click on it.

 

In the 2nd line, even though you can see the Hyperlink, you cannot navigate to the URL when we click on the link since it is inside IF condition and there is a limitation from Microsoft Word.

Rajkumar_1-1614755743492.png

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √