8/18/2025 1:27:27 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Insert Opportunity Product question
Posted: 23 Apr 09 7:52 AM
|
On the insert opp product screen there are several filters at the top of the screen (Name,Family, SKU). I think I have an upgraded 7.2 version of the form with Description as a choice oob. The Description filter seems to have disappeared from the screen in 7.5 - presumably to 'fix' a bug. I get an error when trying to use this filter - it displays a long sql statment and at the end an error message. Here is a shorten version of the error:
could not execute query [ SELECT ... FROM PRODUCT this_ WHERE lower(this_.DESCRIPTION) like ? ORDER BY this_.NAME asc]: Argument data type text is invalid for argument 1 of lower function.
So description is a text field where the others are vchar. Apparently this code called by the filters will not handle making Description lowercase.
Specifically - Is it possible to get at this code and remove the lower() function from this line? lower(this_.DESCRIPTION) Generally - where is this code that is returning the error located? I am guessing somewhere deep in the belly of nhibernate.
Here is the code that returns the error when using the description filter from the insert opp screen: public object GetProductList() { IRepository productRep = EntityFactory.GetRepository(); IQueryable qryableProduct = (IQueryable)productRep; IExpressionFactory expProduct = qryableProduct.GetExpressionFactory(); Sage.Platform.Repository.ICriteria criteriaProduct = qryableProduct.CreateCriteria();
if (_State.NameFilter != string.Empty) { SearchParameter enumCondition = (SearchParameter)_State.NameCond; criteriaProduct.Add(GetExpression(expProduct, enumCondition, "Name", _State.NameFilter)); }
if (_State.DescFilter != string.Empty) { // SearchParameter enumCondition = (SearchParameter)_State.DescCond; SearchParameter enumCondition = SearchParameter.Contains; criteriaProduct.Add(GetExpression(expProduct, enumCondition, "Description", _State.DescFilter)); }
if (_State.SKUFilter != string.Empty) { SearchParameter enumCondition = (SearchParameter)_State.SKUCond; criteriaProduct.Add(GetExpression(expProduct, enumCondition, "ActualId", _State.SKUFilter)); }
if (_State.FamilyFilter != string.Empty) { SearchParameter enumCondition = SearchParameter.Contains; criteriaProduct.Add(GetExpression(expProduct, enumCondition, "Family", _State.FamilyFilter)); }
if (_State.StatusFilter != string.Empty) { SearchParameter enumCondition = SearchParameter.EqualTo; criteriaProduct.Add(GetExpression(expProduct, enumCondition, "Status", _State.StatusFilter)); }
if (chkPackage.Checked) {
} criteriaProduct.AddOrder(expProduct.Asc("Name")); List ProductList = criteriaProduct.List() as List; return ProductList; } |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|