Search code examples
emailhyperlinkdynamics-crmcrmmicrosoft-dynamics

Dynamic CRM - insert external hyperlink with dynamic parameters in Email workflow


I have a Workflow in CRM 2016 on premise that sends an email to a customer when an order is created. The email contains a URL link to external website used for scheduling. The problem is that the hyperlink in the email doesn't fill the parameters we are using from the CRM entities.

I tried several ways to do this. the first way was using the Insert Hyperlink when creating the email through the workflow. this creates the following tags:

<hyperlink><name>Pro Services Online Scheduling Portal</name><value>https://secure.website.com/ProServices?name={Ship To Contact(Order (Order))}&email={Email(Ship To Account (Account))}&OrderID={Order ID(Order (Order))}&Company={Customer(Order (Order))}&skip=0</value></hyperlink>

This correctly adds the hyperlink into the email but the actual link looks exactly as it does in value tag without the CRM values. I tried just adding the link as plain text like so:

https://secure.website.com/ProServices?name={Ship To Contact(Order (Order))}&email={Email(Ship To Account (Account))}&OrderID={Order ID(Order (Order))}&Company={Customer(Order (Order))}&skip=0

This displays the correct URL with the correct CRM values like: https://secure.website.com/ProServices?name=JonDoe&[email protected]&OrderID=ORD-123456&Company=FakeCompany&skip=0 However, the URL itself is still missing the values so if the customer clicks on the link, the incorrect parameters will be sent. It does work if the customer were to copy and paste the link text instead of clicking the URL but most customers would rather click the link.

I even tried used an HTML anchor tag but that also didnt work.

Has anyone else encountered this problem?

Any help would be appreciated.

Here's some blog posts that helped but still looking for answers.

http://dotnetskills-reenapatel.blogspot.com/2014/02/how-to-form-dynamic-hyperlink-url-for.html

http://www.magnetismsolutions.com/blog/paulnieuwelaar/2012/06/25/dynamic_clickable_email_hyperlink_dynamics_crm_2011_workflow


Solution

  • We ended up creating a custom workflow activity to add the hyperlink using SparkleXRM