TOP 5 bugs on the Microsoft Dynamics Portal and how to fix them

This article suggests our solutions to the five most popular bugs you may face when developing a Dynamics Portal. Here they are:

  1. Metadata filter using Dynamic Value Substitution in the view
  2. Lookup converted to drop-down using Dynamic Value Substitution in the View
  3. Entity form for creating in Lookup attribute in Web Form Metadata
  4. Prepopulate Owner lookup field
  5. Restrict read for Home Page

­

Bug #1. Metadata filter using Dynamic Value Substitution in the view

­

­

It is one of the most popular bugs, which almost every developer may face during Portal configuration.

It is well-known that if you want to filter view on Portal depending on logged in user or its “Parent Account” value, you simply need to put single random value in the corresponding lookup attribute in the view filter criteria (See the example below).

View filter criteria

It will dynamically substitute the logged in user Contact record instead of chosen one in the filter. Unfortunately, it does not work with Lookup Metadata filter on Entity List.

When it happens

In the example below you see that you need to provide existing view instead of filter criteria. However, if you want to use here a view with dynamic filtration feature — it won’t work.

Metadata filter of the entity list

How to fix it

The only codeless solution you have is to filter records using Entity Permission. However, be aware, that it will affect all the pages that use “Enable entity permission” condition.

Another approach (using code) is to modify filter options using Liquid+Javascript combination. First will request correct EntityList for you. Second will help you to replace options in filter with dataset retrieved by Liquid.

­

Bug #2. Lookup converted to drop-down using Dynamic Value Substitution in the View

­­­

Description

It is the same bug as before, but now it appears on the entity form when you convert Lookup attribute to drop-down.

This issue occurs with Lookup fields. There is a possibility to convert Lookup attribute to drop-down. However, converted Lookup cannot use the view with Dynamic Value Substitution.

Entity form metadata record

When it happens

Using the attribute Control Style of Entity Form Metadata you can render Lookup attribute as drop-down. Unfortunately, such drop-down will not display data filtered with Dynamic Value Substitution.

How to fix it

There is no supported way to fix this issue. You can return to the common lookup control or use Liquid+Javascript to make it work.

Important! Every lookup that you submitting back to the CRM via form should contain only values that was rendered to user. Therefore, if you modifying lookup options via your custom JavaScript you should not add options that are not present in view for that field. Otherwise, you will get Portal Application Error.

Generic Portal error

­

Bug #3. Entity form for creating in Lookup attribute in Web Form Metadata

­­

Description

This issue appears only with Web Form Metadata, while Entity Form Metadata works as expected. There is a possibility to create a record directly from a Lookup field. It can be done by using Form Metadata for the attribute (See the example below).

Entity Form Metadata settings

When it happens

When you work with Web Form you may need to add such functionality to the Lookup attribute. That’s where the bug appears. Despite Web Form Metadata looks the same, as Entity Form Metadata, it uses Web Form instead of Entity Form for Create for Lookup attribute.

Web form metadata settings

Absence of “New” button in lookup popup

And that’s the reason, why the “New” button does not seem to appear on Portal.

How to fix it

There is no supported way to fix this issue. Unless, you can use JavaScript to add the button, that will open needed entity form. You can find more information about using Javascript on Portal here.

­

Bug #4. Prepopulate Owner lookup field

­

Description

This issue occurs only with Owner Lookup field.

Owner field is a system field in CRM, but you can still change its value. However, you cannot do it form Portal. Neither can’t you do it with Portal settings.

When it happens

When you customize your Entity Form with Entity Form Metadata, you may want to set Owner field. But if you try to ‘Prepopulate field’ or ‘Set value on save’ it won’t work with Owner attribute.

Entity form metadata record

How to fix it

There is no support way to fix this issue. You can work around this error by using one custom Owner Lookup field for ‘Prepopulate field’ functionality. Then using the workflow you can set the value of the custom Lookup to the Owner field (see image below).

­

Bug #5. Restrict read for Home Page

­

Description

This issue can happen when you use Web Page Access Control Rules.

SignIn Page considered as part of Home Page. Therefore, restricting read to Home Page will also affect SignIn Page.

When it happens

So when you use ‘Restrict read’ option to Home Page, you won’t see all of it’s child Pages and files (styles included).

SignIn Page with Restricted Read

How to fix it

There is a very easy way to fix it. Just switch the scope from ‘All content’ to ‘Exclude direct child web files’ and all child pages will render correctly.

Web Page Access Control Rule settings

­

Conclusion

­

Despite Microsoft Portal has numbers of other small bugs, you can always work around them and achieve the desired result. Microsoft Portal remains very useful and powerful platform to use in addition to Dynamics 365.

I hope our article and provided resolutions will help you with the issues, you might face on Portal.

We want to know your feedback! Please send questions and comments about this article in social media or email us at info@uds.systems with subject “Dynamics Portal bugs”.

This article originally appeared on UDS blog by the team.

We are Dynamics365 / PowerApps experts. We provide Dynamics 365 R&D services, migrations, projects, and support services.