SBX - Search With Button

SBX - Forum Post Title

How to get the Portal URL in workflow

Microsoft Dynamics CRM Forum

Ravi Kashyap asked a question on 6 Jun 2019 10:18 PM

Question Status

Suggested Answer

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?

Reply
Verica Hodder responded on 7 Jun 2019 5:03 AM

Exactly what I'm after too.

Reply
Pranav Shroti responded on 7 Jun 2019 6:13 AM
My Badges
Suggested Answer

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.

Reply
Oliver Rodrigues responded on 7 Jun 2019 9:07 AM
My Badges
Suggested Answer

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

Reply
Dmytro Rutkovskyi responded on 7 Jun 2019 2:49 PM
My Badges
Suggested Answer

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

Reply
Pranav Shroti responded on 7 Jun 2019 6:13 AM
My Badges
Suggested Answer

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.

Reply
Oliver Rodrigues responded on 7 Jun 2019 9:07 AM
My Badges
Suggested Answer

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

Reply
Dmytro Rutkovskyi responded on 7 Jun 2019 2:49 PM
My Badges
Suggested Answer

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

Reply

SBX - Two Col Forum

SBX - Migrated JS