Muhammad Ali Khan

MS CRM 3.0, MS CRM 4.0, Sharepoint 2007 & Sharepoint 2010

Using MS CRM 3.0 Lookup Form In Your Asp.Net Application

Posted by Ali Khan on November 28, 2007

In this post, I am going to show you how to use the MS CRM 3.0 Lookup form in your application.

So first, here how the MS CRM 3.0 Lookup form looks like

lookup.jpg

Now with only few lines of javascript code you will be able to use this form in your application.

 so here is the sample javascript code J <html>
<head>
    <script language=”javascript”>
        function LookupArgsClass()
        {
            this.items = null;
        }
       
        function openWindow()
        {
            //debugger;
            //var sPath=’_controls/lookup/lookupsingle.aspx?class=null&objecttypes=2&browse=0&DefaultType=0′;
            var sPath=’/_controls/lookup/lookupsingle.aspx?class=ActivityRegarding&objecttypes=1,2,3,4,112,1010,1084,1088&browse=0&DefaultType=2′
            var args = new LookupArgsClass();
            args.items = document.getElementsByTagName(“SPAN”);
            var sCustomWinParams = “dialogWidth:600px0px;dialogHeight:488px0px;dialogLeft=0px;dialogTop=0px;help:0;status:0;scroll:0;center:1;resizable:yes;”
            var abc = window.showModalDialog(sPath,args,sCustomWinParams);
            alert(abc);
        }
    </script>
</head>
<body>
    <input type=”button” onclick=”openWindow()” value=”Click here…”/>
</body>
</html>

 In my other post i am going to show you how to create a lookup like MS CRM 3.0 in your own asp.net application

Advertisements

2 Responses to “Using MS CRM 3.0 Lookup Form In Your Asp.Net Application”

  1. Shai said

    What about this sample for CRM 4.0 ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: