Redirect URL configurations not working in PowerApps/ Dynamics 365 Portals? May be it does not work the way you think it should.

Recently I was working in some portal customizations for my client and one of the requirements that came in was to place a re-direct for a portal url. If you are unware of redirects in Portals, this docs link is the perfect place to get started.

To put it short, you can create a redirect URL for an request so that when an incoming request is received for the URL, the user is redirected to a new URL/ page that you have configured.

So the portal developer went ahead and created a redirect url similar to the below one.

image

So basically when the user tries to navigate to the Left Nav Page, the user should be redirected to the Maintenance page. If you want the user to be redirected to an external URL, just fill in the value for Redirect URL field and you should be good. All fields are explained in docs link I shared at the start of this blog.

I have designed a kind of mock here for this blog post. The home page was kind of like below.

image

As it was expected, when the user clicks on the “Left Navigation Page” now, the user should be redirected to the Maintenance page as redirected as per the redirect rule.

However surprisingly enough, the redirection didn’t happen and the user was taken to the usual page configured for that link.

The first impression as it comes along is the redirection is not happening and if this is the first time you are working with redirects, you are bound to get confused.

To understand whether it is happening or not, here is the thumb rule to remember which I could understand purely based on my experience and not something explicitly written – “If the inbound url configured for redirect is already existing, the redirect URL for that incoming URL would never fire and the original page would be displayed”.

In this example – the left-nav-page url was still pointing to a valid webpage and hence the redirection never took effect.

So when does redirection really happen. If you are browsing a legacy URL which no longer exist or a webpage link which customer have saved as bookmark but the page url has been modified, redirect URL comes into the picture. If the inbound URL could not be matched with any existing URL’s, redirect rule would start taking effect if a rule is being configured for that inbound request. The Microsoft docs link infact says so – “Customers frequently want to have a simple URL that redirects to a page deeper in the site, or they want to allow for a legacy URL to be used with the site and automatically redirect to a new URL in the site.” But trust me, interpreting this and understanding can be a tough one to start with.

So for this example here, we just changed the URL of the page from “left-nav-page” to “left-nav-page-bak”. Now when we browse the URL – /left-nav-page">https://<portalurl>/left-nav-page, we are redirected to the maintenance page as configured in the redirect URL.

Simple one yet tricky. Hope this helps!

Debajit Dutta

(Dynamics MVP)

For consultation/ corporate training visit www.xrmforyou.com or reach out to us at info@xrmforyou.com

Our product offerings:

Role based views for Dynamics 365 (http://www.xrmforyou.com/role-based-views.html)

CRM-Sharepoint Attachment uploader and metadata manager (http://www.xrmforyou.com/sharepoint-integrator.html)

Record Cloner for Dynamics 365 (http://www.xrmforyou.com/record-cloner.html)

Author: Debajit

I am a Dynamics CRM Most Valuable Professional (MVP) with 12 years of experience in Microsoft .NET Technologies and 9 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s