Answered by:
CRM 2011 Lookup window in a custom html page issue

Question
-
Answers
-
HI Arun,
Instead of window.showModalDialog use "openStdDlg";
Example: var lookUp = openStdDlg(url, "", 600, 600, false);
alert(lookUp.items[0].id);//here u will get Id.
alert(lookUp.items[0].name);//here u will get Name.
-----------------------------------------------------
If it is useful to you then Make sure to "Vote as Helpful" and "Mark As Answer".
Thanks,
Sravan J.
Thursday, July 11, 2013 1:05 PM
All replies
-
HI Arun,
Instead of window.showModalDialog use "openStdDlg";
Example: var lookUp = openStdDlg(url, "", 600, 600, false);
alert(lookUp.items[0].id);//here u will get Id.
alert(lookUp.items[0].name);//here u will get Name.
-----------------------------------------------------
If it is useful to you then Make sure to "Vote as Helpful" and "Mark As Answer".
Thanks,
Sravan J.
Thursday, July 11, 2013 1:05 PM -
hi sravan,
thanx for ur rply..the code is working which is given by you.. But i have one more issue with ur code..when i using this "openStdDlg" one i can not get the new button in my dialog box.. can u give me the solution for this..
Thank you
Arun Kumar G
Friday, July 12, 2013 4:31 AM -
Hi Arun,
Check your url once. Check the properties of your url.
I am giving one example url.
..................._controls/lookup/lookupinfo.aspx?AllowFilterOff=1&DefaultType=8&DisableQuickFind=0&LookupStyle=single&ShowNewButton=1&ShowPropButton=1&browse=false&objecttypes=8
In that url you can find the ShowNewButton Properties
ShowNewButton=1,means it was displaying the new button on dialog box.
ShowNewButton=0, means it hide the newbutton.
And you can also check the securityroles of current user. Is that user having permissions to create New Record for that entity or not?
Thanks,
sravan J.
Friday, July 12, 2013 11:27 AM