locked
Associate Lookup with ISV webpage RRS feed

  • 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

All replies

  • Wednesday, December 8, 2010 1:54 PM
    Moderator
  • 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