Environment Field in a Hyperlink in an HTML Email

  • 16 November 2009
  • 6 replies
  • 0 views

Badge +3

I am trying to create an email in a K2 blackpearl process that includes a hyperlink to a K2 worklist on a SharePoint site. I want the URL to come from an environment field, so I can have a different one for dev, QA, and Prod. However, when I use the environment field K2WorkslistLink in the hyperlink:



Click <a href="K2WorklistLink">here</a> to see your K2 worklist.



it looks like this when the email comes through:



Click <a href="</span></span>http://dswebres/testsites/BethA/default.aspx<span style='font-family:Arial;font-size:12px;font-weight:Normal;font-style:Normal;font-stretch:Normal;color:#FF000000;text-align:Left;text-decoration:;' id='run'>">here</a> to see your K2 worklist.


http://dswebres/testsites/BethA/default.aspx is the actual value of the environment field K2WorkListLink, so the rest of the stuff got added.


Isn't there a way to do this without having to go into code?


Thanks,


Beth



6 replies

Userlevel 4
Badge +14

What happens if you change the “K2WorlflowLink” data field to the actual url? Does it display correctly the? Is the mail set to Plain text or HTML?

Badge +3

I didn't try that because I assumed it would work. Also, I wanted to avoid the hard-coded link option, since I don't want to update that in a half-dozen emails when changing environments.


The mail is set to HTML.


I will give it a try though - thanks!


Beth

Badge +3

Well, I tried putting the link itself in the email without using the Environment Field. And I got the same result! So the real problem is creating a hyperlink in an HTML email.  I could resort to using code behind the event as seen here: http://www.k2underground.com/forums/t/10618.aspx. I think I will open a ticket with K2 first though.

Badge +3

I asked K2 support about this and it turns out it's a bug with Outlook 2003 that will be fixed in a future release. By then, we will hopefully have Outlook 2007.


Changing the code in the mail event as mentioned in the link above worked fine.

Badge +8

http://k2underground.com/forums/t/10618.aspx


 


pls take a look at this

Badge

I recently ran into a similar issue and I have blogged the solution I have come up with.

 

http://blogs.claritycon.com/blog/2014/10/k2-blackpearl-adding-url-links-email-message-body/

 

Hopefully this is helpful to others.

 

sVemula

Reply