Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 71679

Forum Post: Error in open contact entity in modal window with js code

$
0
0
Hi All, I am trying to open contact entity in modal window with js code but getting an error and entity is not loaded with attributes. Modal window opens with an error " An error has occurred . Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support ". Below code for refernce. Can someone pls help me in this to fix it. Thanks! function openContact() { var Contactlookup = window.parent.Xrm.Page.getAttribute("from").getValue(); var regardinglookup = window.parent.Xrm.Page.getAttribute("regardingobjectid"); if (regardinglookup == null || regardinglookup == undefined) return; var regardinglookupvalue = regardinglookup.getValue(); // pop the associated contact in a new window if present - else display error to user if (regardinglookupvalue != null && regardinglookupvalue != undefined) { var lookupid = regardinglookupvalue[0].id; lookupid = lookupid.replace("{", ""); lookupid = lookupid.replace("}", ""); //var options = { // openInNewWindow: true //}; //window.parent.Xrm.Utility.openEntityForm("contact", lookupid, null, options) var DialogOption = new window.parent.Xrm.DialogOptions; DialogOption.width = 900; DialogOption.height = 620; window.parent.Xrm.Internal.openDialog(window.parent.Xrm.Page.context.getClientUrl() + "/main.aspx?etn=contact&newWindow=true&histKey=795118304&pagetype=entityrecord&id={" + lookupid + "}", DialogOption, null, null, CallbackFunction); //window.parent.Xrm.Internal.openDialog("Web Resource path",DialogOption,null, null,CallbackFunction); function CallbackFunction(returnValue) { } } } Thanks DK

Viewing all articles
Browse latest Browse all 71679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>