Answered by:
Associate Lookup with ISV webpage

Question
-
I have a Entity A lookup on quotedetail, where when I click on the lookup I get the usual lookup dialog. In my case I have an ISV web page that does detailed searches on the lookup entity A. What I like to do is that when I click on lookup button on quotedetail I get to invoke the ISV web page directly and then from there I can get my search result.
Any code example would be greatly appreciated.
Syed
Wednesday, December 8, 2010 1:39 PM
Answers
-
Hello.
You should check following article - http://mscrmtools.blogspot.com/2010/10/crm-40-overriding-lookup-onclick.html
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by Faisal Fiaz Wednesday, December 8, 2010 6:46 PM
- Marked as answer by DavidBerryMVP, Moderator Thursday, December 9, 2010 5:30 PM
Wednesday, December 8, 2010 1:54 PMModerator
All replies
-
Hello.
You should check following article - http://mscrmtools.blogspot.com/2010/10/crm-40-overriding-lookup-onclick.html
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by Faisal Fiaz Wednesday, December 8, 2010 6:46 PM
- Marked as answer by DavidBerryMVP, Moderator Thursday, December 9, 2010 5:30 PM
Wednesday, December 8, 2010 1:54 PMModerator -
Andriy,
Thank you, the solutions in that article worked for me.
Thanks again
Syed
Thursday, December 9, 2010 10:41 AM -
You could add a method such as the one below to replace the argument used by window.oldOpenStdDlg. The code below attempts to replace the URL to the lookupsingle.aspx page with a URL to a custom lookupsinglepage.aspx page. You could revise this to check for a specific URL or event and then replace the argument with the URL of the page you desire to use
(function ReplaceCrmLookup(){window.oldOpenStdDlg = window.openStdDlg;window.openStdDlg = function(){arguments[0] = arguments[0].replace(/\/_controls\/lookup\/lookupsingle.aspx/i, "/ISV/" + ORG_UNIQUE_NAME + "/controls/lookupsingle.aspx");return oldOpenStdDlg.apply(this, arguments);};})();Thursday, December 9, 2010 3:04 PM