FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



Using the lookup filter with a dropdown list...Expand / Collapse
Message
Posted 4/4/2007 3:37:03 PMPost #1349
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I am trying to use the lookup filter to filter accounts by Relationship Type(customertypecode). I want to just return all accounts that are of type "Broker". However it causes the error "An unexpected error occurred". If I try to apply the filter to a text field, there is no problem. It is only when trying to apply it to a field that is a drop-down that is causes this unknown error. My code is as follows:

        ILookupFilter objFilter = ControlFactory.CreateLookupFilter();
        objFilter.AttributeName = "customertypecode";
        objFilter.EntityType = 1;
        objFilter.Operator = c360.Toolkit.CRM2005.ConditionOperator.Equal;
        objFilter.Values.Add("Broker");
  objTable.Rows[1].Cells[0].Controls.Add(new LiteralControl("Account:"));
  ILookup objAccountLookup = ControlFactory.CreateLookup();
  objAccountLookup.AllowedObjectTypes.Add(1);
  objAccountLookup.AllowCreateNew = true;
  objAccountLookup.AllowViewProperties = true;
  objAccountLookup.LookupStyle = LookupStyles.Single;
  objAccountLookup.ID = "lookupAccount";
        objAccountLookup.Filters.Add(objFilter);
  objTable.Rows[1].Cells[0].Controls.Add(objAccountLookup.Control);

Posted 4/4/2007 5:57:02 PMPost #1352
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
It looks likt the problem is that you are using a string value ("Broker") in order to filter an integer field (customertypecode).

If I were you, I would figure out the integer value representing the "Broker" value and I would use that value in the filtering.

Let me know if this helps.

 

« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: kanika.jackson, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:03am

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.297. 15 queries. Compression Enabled.