• 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中的几种多线程实现
    在mac下使用终端管理svn
    关于UIScrollViewDelegate协议中每个回调函数的意义及执行顺序的理解
    UIView 及其子类对象 抖动效果的实现
    ios、andriod、cocos2d 视图层次理解
    委托  通知中心   监听/观察
    iphone 中使用苹果禁用的私有Framework
    关于苹果官方网站Reachability检测网络的总结
    iOS设备的分辨率
    ios开发多线程、网络请求的理解 错误码的理解
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/15045475.html
Copyright © 2020-2023  润新知