Solved

CRM 4.0 Filtering Lookup For Records Lookups

Posted on 2010-08-19
3
1,751 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

805 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