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;
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
"fetchXml=<fetch mapping='logical'><entity name='campaign'>"
+ "<all-attributes/><filter type='and'><condition attribute='statuscode'"
+" operator='ne' value='4' /></filter></entity></fetch>");