zoukankan      html  css  js  c++  java
  • show dialog in Dynamics 365/PowerApps

     

    Here are ways that were used by developers to show Modal Dialogs:

    1. Xrm.Internal.openDialog
    2. Alert.js
    3. Custom Dialogs that used different frameworks like jQuery UI Dialog or similar

    But the main and common issue of options available was that those approaches can’t be considered as supported.

    And it stayed the same for years until Microsoft introduced Xrm.Navigation.navigateTo method.

    So what’s new here?

    Here is the code that can be used to open a modal dialog:

    So far so good. When this code is called following dialog window is shown:

    Next part is the extraction of parameters passed to the webresource. Firstly I tried getQueryStringParameters of GlobalContext in two combinations – GetGlobalContext().getQueryStringParameters and Xrm.Utility.GetGlobalContext().getQueryStringParameters and both calls did not bring the expected result. So… the last resort is explicit parsing of the URL. The following code can be used for parsing:

    Now let’s make this dialog look closer to standard dialogs and add “OK”/”Cancel” buttons to it. There are multiple ways of doing this. I decided to use “Office UI Fabric” for this purpose. Here is the code of the dialog page:

    Here is how it looks like after modifications:

    The following code can be used to close it:

  • 相关阅读:
    [iOS]一行代码集成空白页面占位图(基于runtime+MJRefresh思想)
    怎么去掉Xcode工程中的某种类型的警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int32
    iOS悬浮窗口(无论界面跳转、View始终在视图上显示,可移动)
    开发工程中遇到的BUG
    iOS基于B站的IJKPlayer框架的流媒体探究
    iOS 快速集成ijkplayer视频直播与录播框架
    每日英语:Air Pollution From Coal Use Cuts Lifespans in China, Study Shows
    每日英语:Do Successful People Need Sleep?
    每日英语:Risk-Averse Culture Infects U.S. Workers, Entrepreneurs
    每日英语:How to find the career of your dreams
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/15045475.html
Copyright © 2011-2022 走看看