opening the solution configuration page using html

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>Licensing</title>
    <script src="../../ClientGlobalContext.js.aspx" type="text/javascript"></script>
<script src="https://mtcau.crm8.dynamics.com//WebResources/mtccc_XrmSvcToolKit.js" type="text/javascript"></script>
<script type="text/javascript">
    function openLicenseSolution() {
        var url = Xrm.Page.context.getClientUrl();
        var solFetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +
                        "<entity name='solution'>" +
                        "<attribute name='uniquename' />" +
                        "<attribute name='solutionid' />" +
                        "<filter type='and'>" +
                        "<condition attribute='uniquename' operator='eq' value='Licensing'/>" +
                        "</filter>" +
                        "</entity>" +
                        "</fetch>";
        XrmSvcToolkit.fetch({
            fetchXml: solFetchXml,
            async: true,
            successCallback: function (res) {
                url = url + "/tools/solution/edit.aspx?id=%7b" + res.entities[0].solutionid.toUpperCase() + "%7d";
                window.open(url, "", "width=1000,height=800");
            },
            errorCallback: function (err) {
                alert(err.message);
            }
        });
    }
</script>
</head>
<body>
      <div style="text-align:center; font-size:30px; font-weight:bold; margin-top:200px;">If you want to go solution page click <span class="menu_links" onclick="openLicenseSolution()" onmouseover="" style="cursor: pointer;"><u>HERE</u></span></div>
</body>
</html>


Comments

Popular posts from this blog

Basic Plugin Code in D365 using C#

CURD (Create, Update, Retrieve and Delete) Operation in D365 using Power Shell Script

Meta Data Using WebApiRequest