Solved

CRM 4.0 Filtering Lookup For Records Lookups

Posted on 2010-08-19
3
1,759 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
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…

733 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