locked
MSCRM 2015 updated version dialog box RRS feed

  • Question

  • Facing problem to show custom dialog box(popup) in mscrm updated version.I used bellow code it is working fine in mscrm 2015 but in mscrm 2015 updated version not working 

    _url:html type web resource url 

    web resource code is 

    <html><head>
    <meta charset="utf-8">
    <title>Reason</title>
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <script src="/tgm_JQueryScript" type="text/javascript"></script>
    <script type="text/javascript">
    	$(document).ready(function () {
    	    $("#btnAdd").click(function () {               	         
    			var oReturn = $("#txtReason").val();
    			if(oReturn==null || oReturn=="")
    			{
    				alert("please enter reason");
    				return;
    			}
    			Mscrm.Utilities.setReturnValue(oReturn);
    			try {
    				closeWindow(true);
    				}
    			catch (e) { }
    	    });
    
    	 $("#btnCancel").click(function () {               	         
    						try {
    				closeWindow(true);
    				}
    			catch (e) { }
    	    });
    	});
    </script>
    <style type="text/css">
            body {
            margin:auto;
            }
    		#divContainer
    		{
    			width:400px;
    			
    		}
    		#divTags
    		{
    			
    			margin:0px auto;
    		    width:80%;
    		}
    		#reactiveHead
    		{			
    			font-size:22px;
    		}
    		#btns
    		{			
    			float: right;
    		}
    		#divtextArea
    		{			
    			margin-bottom: 5px;
    		}
    </style>
    </head>
    <body style="-ms-word-wrap: break-word;">
    <div id="divContainer">
    	
    	<div id="divTags" style="width: 80%; height: 113px;">
    		<div>
    			<span id="reactiveHead">Reactivate Case</span>
    		</div><br>
    		<div id="divReason">
    		<div id="divtextArea">
    			<label for="txtReason">Reason</label><textarea id="txtReason" style="width: 320px; height: 95px;" rows="1" cols="1"></textarea>
    		</div>
    		<div id="btns">
    &nbsp;&nbsp;	
    &nbsp;&nbsp;	
    &nbsp;<input class="ms-crm-Button" id="btnAdd" type="button" value="Reactivate">	<input class="ms-crm-Button" id="btnCancel" type="button" value="Cancel"></div>
    		</div>
    	</div>
    </div>
    </body></html>

     Xrm.Internal.openDialog(Mscrm.CrmUri.create(_url).toString(),
    DialogOption,
    null, null,
    CallbackFunction); //on closing of pop up the CallbackFunction will fire  

    Saturday, June 20, 2015 4:41 AM

Answers

  • We successfully resolved this issue 

    Just we have passed web service URL as below

    _url = "$webresource:new_confirmdialog";  




    • Marked as answer by Ashok Jinkala Thursday, October 1, 2015 11:30 AM
    • Edited by Ashok Jinkala Wednesday, January 6, 2016 10:35 AM
    Thursday, October 1, 2015 11:30 AM

All replies