Hi,
I have portals configured for dev, test & prod environment. I need to send a portal link (e.g. https://<portalurl>/?<recordid>) of a record in an email via workflow. The portal url is different for all the environment.
How will I add the portal url dynamically in the email so that it redirects to the correct portal url i.e. dev, test * prod?
*This post is locked for comments
Hey Ravi, I'm also trying to achieve the same. Could you please share sample code of custom activity here.
It would be helpful for me to implement the same thing in faster way!
Hi All,
As suggested, I ended up with the custom workflow activity to build the URL dynamically whilst storing the domain in a custom config entity.
If you email somehow connected to website, you can use website.adx_primarydomainname as had been already suggested.
But most clean way will be to write custom action (plugin) to return this url from the active bindings for required website. Because primary domain can be not the most relevant (especially if you migrate web sites between environments), or site can has multiple domains.
There are other options to use "site settings" entity, "settings" entity or custom similar entity
I suggest creating a custom workflow that retrieves the "primary domain" field from the Website entity, this custom workflow can have an output parameter that you can use in your workflows
Hi Ravi,
I did similar thing for a customer. Where in on load of an new email record, I was applying predefined templates with tags. All using JS. Once are in onload you can get the template and replace the tags with the Dynamic Portal URL (this you can get from config or similar). Template then can be applied to Email record.
I am sure you will get the desired result.
Exactly what I'm after too.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6