Solved

CRM 4.0 Filtering Lookup For Records Lookups

Posted on 2010-08-19
3
1,743 Views
Last Modified: 2012-05-10
Hi

Got a question regarding filtered lookups in CRM.. What I'm trying to achieve is when a user opens a Campaign Response record, they click on the lookup for the relating Campaign record. In the list of campaigns that come back, I want to show all except those ones that have been Cancelled.

Now there are loads of blogs, web sites, etc.. giving solution to this problem. One I picked on was at;

http://crm.georged.id.au/post/2008/02/16/Filtering-lookup-data-in-CRM-4.aspx

Now, I followed that example and did all steaps outlines.. I created my version of the piece of code below and placed it in the onLoad() event of the Campaign Response.

Doesn't work... Am I missing something completely here ?


var field= crmForm.all.regardingobjectid;

    field.lookupbrowse = 1; 

    

    // Pass fetch xml through search value parameter 

    field.AddParam("search", 

      "fetchXml=<fetch mapping='logical'><entity name='campaign'>"

       + "<all-attributes/><filter type='and'><condition attribute='statuscode'"

       +" operator='ne' value='4' /></filter></entity></fetch>");

Open in new window

0
Comment
Question by:BigBlueMan
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
pbergen earned 500 total points
ID: 33487072
This approach requires the additional code to lookupsingle.aspx file as well.

Given the unsupported nature of the fix (and the coming CRM5 upgrade in the coming months) I prefer to use the Stunnware solution by .

http://www.stunnware.com/default.aspx?area=products&group=fld4&subarea=fld4-overview

I believe Michael has used supported techniques to do the same thing... and the management interface is simple and well documented.

If you don't get your solution going quickly, I suggest looking at the Stunnware piece by Michael Hohne.
0
 

Author Comment

by:BigBlueMan
ID: 33499105
Hi pbergen

I was looking for a quick free solution, but am aware of the stunnware implementation. Thanks anyways for replying..

0
 

Author Closing Comment

by:BigBlueMan
ID: 34032254
sorted thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now