Blog, Development, Howto

PCF: Using in Panels and Dialogs

In my previous post, I described a way around on how to embed PCFs into MDA. During the investigation of what is possible, I found out that Xrm.Navigation.navigateTo ignores “navigationOptions” so it was not possible to show PCF in modal dialogs. I don’t like limitations, so I was looking for a way around it, and in this post, I will provide a way around to use this pattern.

Panels

With panels, everything is relatively easy. Usage of the following script initializes and shows PCF inside the panel:

Dialogs

With the dialogs, everything is not as straightforward as it was with Panels because Xrm.Navigation.navigateTo ignores “navigationOptions” parameter. At the same time, it works fine with HTML webresources, and that was the key clue for me. I will use html webresource in the opening script, and inside of html webresource I will navigate to PCF control. Here is how it might look:

And here is the code on how to open the webresource in dialog mode:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.