Tuesday 27 March 2018

Updating the redeem invitation URL in the Send Invitation workflow in Dynamics Portals

21:31 Posted by Benitez Here , , , No comments
The Send Invitation workflow in Dynamics Portals is what is used to invite Contacts to access the portal by redeeming an invitation code. One of the workflow steps is a Create Email step where there is a URL that outlines the web address of the portal and an embedded invitation code from the Invitation record.

In case you're not familiar with the Dynamics Portals redeem invitation process it looks like this:
  • An Invitation record is created and associated to a Contact. 
  • When the Invitation record is created, an invitation code is automatically generated that is unique for the invitation of that Contact.
  • An email is sent to the Contact once a Dynamics 365 end user runs the Send Invitation workflow. 
  • In the email there is a redeem invitation URL that contains the page address for the Contact (user) to sign up with an invitation code and the invitation code is embedded.
  • When the Contact clicks on the URL they are directed to the Sign up with an invitation code web page.
Those who have tried to update the URL in the email step may have experienced some loss of time. I say this cause there's a trick to it and I get asked about it frequently where I currently work at Barhead Solutions.

In my vlog I go through what people think would work (note I have experienced these scenarios myself and so have colleagues) and I also show you the trick into successfully making the URL work. Watch my vlog for a detailed walk through.

Most common mistake

The most obvious path to take initially when doing this for the first time is copying the Dynamics Portals URL address into the hyperlink that's already provided in the Send Invitation workflow. This won't work.

Almost there

OK I am going to try my best to explain this in written format. This is one of those occasions where a video demonstrates the steps better compared to written instructions.

First insert your hyperlink using the hyperlink wizard (is it a wizard?). Make sure you use your Dynamics Portals address. Save and Close.

When the hyperlink is displayed in the email message, you want to set your mouse cursor after the =%f and select Encode Invitation Code in the form assistant. Make sure you remove any extra spaces after =%f and before the </value> statement of the hyperlink. It should look like the following below underlined in red once you've inserted the slug.

Bonus Tip

If you only apply the Encode Invitation Code, the user experience is that the Invitation Code field in the Sign up with an invitation code web page will be blank.

A user is not going to know what to insert in the field. Even if you did expose the invitation code in the email and explicitly stated "Hey user, copy and design this long piece of code below to access the portal," there's still the risk of the user entering it wrong or copying and pasting with spaces or missing characters. The user may try again and can still get it wrong. Not a happy user experience.

To have the Invitation Code automatically populate with the generated code from the Invitation record in Dynamics 365, there's extra string/text to enter in the hyperlink:

&invitation=

You want to insert this before the Encoded Invitation Code slug in the email.


By doing this, the user experience will be that they are directed to the Sign up with an invitation code web page and the invitation code is automatically updated without input from the user.

Side Note

You can choose to expose the raw URL with the invitation code in the email message as seen in the original URL provided in the Send Invitation workflow. I think it's better to show it as a hyperlink where more user friendly text is provided such as the standard "Click here to ...."

Sometimes seeing a long raw URL with funky characters can be a bit too much for a user. This is my personal opinion, you don't have to follow it.

Summary

Updating the redeem invitation URL in the Send Invitation workflow isn't so bad after you know how to do it. I've found this works for me 100% every time I apply the above steps.

If you have something else that works let me know by leaving a comment in my YouTube video. Otherwise if you did give it a go yourself and it works, leave me a comment too :)

Thanks for stopping by and toodles till next time.

Tuesday 20 March 2018

Preventing users from seeing the Search feature in Dynamics Portals

22:04 Posted by Benitez Here , , , No comments
In every Dynamics Portals project I've worked on customers will always ask "Can the search in portals find results in custom entities?" The search feature of Dynamics Portals unfortunately does not allow custom entities to be enabled (yet).

Refer to Colin Vermander's answer in this Dynamics Community Forum post.
Colin's suggestion is to vote for it on the Microsoft Ideas site: Ability to search custom entities in Portals. Please vote :) Thank you.

The next question I get asked is "Can we prevent users in seeing it then?"
Yes, this can be done and I can help with this. Check out my vlog below.

Steps

There is no code required to prevents users in seeing the search feature in Dynamics Portals. You don't need to fiddle with the .css or use JavaScript. It's a matter of clicks. 

Update a Site Setting record

In Dynamics 365, navigate to Site Settings and open the "Search/Enabled" record.

Update the Value field from "true" to "false." Save and close the Site Setting.


Browse to your Dynamics Portals and hit the refresh button. You'll now see that the search feature no longer appears.

Summary

By updating the Site Setting record, the search feature will no longer display in Dynamics Portals. It's done in a few clicks without the need for code.

Till next time.