One of our clients was experiencing some trouble with the Dynamics 365 flow button for “Accounts”. When they clicked the button, its dropdown menu opened but got stuck on “Loading…”.

Dynamics 365 flow button stuck on loading

 

When checking the console in the Developer Tools (F12), there was an error popping up that said:

 error on line 1 at column 1106: attributes construct error

After a little online research, there was nothing concrete to find about this problem. So the only thing there is to do, is dive a little deeper in the error message ourselves.

error-message

It looks like the menu dropdown gets loaded as XML which then gets parsed into HTML elements. This error gives us a clue that there must be something wrong with the given XML… But what?

Because the flow button was working fine with other entities, the problem must have something to do with workflows registered on the Account entity. And more in particular, the workflows registered “As an on-demand process” because they get loaded into the dropdown menu.

Next, we deactivated every workflow registered on Account at a time. This way we could check whether the dropdown was loading or not. There was indeed one workflow that was causing this error and thus stopping the dropdown from loading.

 

bad-workflow-names

As you can see in the Process Name, a part is surrounded by double quotes. This scrambles the XML, making it invalid and setting off the error.

 

good-workflow-name

Just by replacing these double quotes with single quotes, we were able to fix the problem. The flow menu dropdown now loads and shows the workflows registered as an on-demand process like it should.

dropdown-loaded

 

So there we have it. Just be careful in naming your workflows and/or other attributes. It could save you a lot of time trying to find out why something stops working or sets off an error!