Javascript in the Business Process Flow: header_process_ and postfixes

Some things you run into make you go: ‘Oh yeah, totally forgot about that’. I hope most of you don’t have this happen all that often. I ran into one of them a few days ago and thought I’d share.

I was adding a custom filter to a lookup-view in the business process flow, as you can’t change the view in version 8.2 of Dynamics 365 via normal configuration. I ran into a problem where the filter worked on some fields in the flow, but not all. After spending quite some time on this I came to the below conclusions.

When customizing the business process flow via Javascript, you have to take into account that Dynamics adds ‘header_process_’ as a prefix to your fieldname. In addition, there is something else Dynamics does that is less obvious, and maybe less known as it won’t occur all the time. Dynamics adds a postfix of _X to each field that’s repeated in the same business process flow. X here is the next occurrence, starting with 1. The reason this is hard to spot is that it happens all the way at the end of the schema name of a field. Even if you use a tool like the Power Pane (which I would recommend), you probably won’t see the postfix in the schame name unless you hover over it to appear in full.

In my specific case, I work with a branched business process flow in which two similar stages exist, but you only ever see one of them. The invisible stages of the business process flow are also taken into account when the postfixes are appended. I didn’t know about this, and didn’t look closely enough at the exact schema names!

Another reason the search can take so long is that your code doesn’t actually give any errors. It simply doesn’t execute!

Hope this helps some of you out.

Omnichannel Engagement HUB – AADSTS65001: The user or administrator has not consented to use the application with ID

When you would like to work with the whole new Dynamics 365 Omnichannel Engagement HUB and you get the following error:

AADSTS65001: The user or administrator has not consented to use the application with ID

Please follow the next steps to solve it:

Navigate to the applications tab in the Dynamics 365 Administration Center, as stated on the official Microsoft website :

Manage Omnichannel application

Click on “Manage” and you will be redirected to the Omnichannel Management screen looking like below:

You can add an organisation and follow trough the steps. Unfortunately most of the times an error will pop-up with the following message:

AADSTS65001: The user or administrator has not consented to use the application with ID ‘someid1’ named ‘Omnichannel for Customer Service’. Send an interactive authorization request for this user and resource. Trace ID: someid2 Correlation ID: someid3 Timestamp: sometimestamp

Transactie-id: someid4

It’s impossible to solve this part in Azure because the consent cannot be managed from there.

That’s why we have to manually consent the Omnichannel Engagement App via an URL:{client-id}

At the place of the client-id please put the ID ‘someid1’ from your error message. Agree to this consent and now you can install Omnichannel Engagement HUB for your organisation.

Please be aware that you need to be a Global administrator.