Tuesday, 15 July 2014

F-12 in model window and clear cache in IE

I had a requirement where we have to show a custom web page as a model window, I have used jquery on the custom site and was trying to hit a break point, I was hitting couple of issue first one was the javascript file was not getting updated as it was a model window I wasn't able to press CTRL+F5, to sort this out

Press F12 on the main I.E and got to Cache and then select 'Always refresh from server option'

Second issue I was hitting was I wasn't able to open debug window by pressing F-12 on model window. To sort this out

In the main window Go to Internet Options then select Security Tab and then click on the Custom Level button and under Miscellaneous options select the 'Disable' option for the 'Allow websites to open windows without address or status bars.

Thursday, 10 July 2014

how to get access to parent record from the new entity record opened using the lookup view

I had a requirement where we got a lookup field on the entity form and on click of that lookup user is able to either select existing record or click on new record, the new record needs to have reference of some selects which user have specified in the initial form.

CRM passes the details of parent window in the url, and used the following code  to extract the id
 
var idMatch = (/currentid=([^&]+)/i).exec(parent.window.opener.location.search);

if (idMatch != null) {

var id = idMatch[1];

    id = id.replace("%7b", "");

    id = id.replace("%7d", "");

return id;



}