Hi Team,
We have a scenario to display only few products when the add (+) icon is clicked in the Product detail of Order section. When the add record is clicked a product catalogue is displayed.
Required Filter Scenario:
All the products that belong to a particular price list alone should be shown in the product catalogue list along with additional columns in the Product Price table is also taken into consideration for the filter.
Only Products that match the below conditions should be displayed in the list,
- Particular Price List.
- Particular column value in Product Price (Custom Column ex: UsrProductGrade).
- Particular column value in Product Price (Custom Column ex: UsrIsActive).
Required Default Value in UOM Lookup:
When the product catalogue page is opened the UOM (Unit of Measure) field should be set with a particular lookup value by default available in that lookup & set to locked (not editable).
Filter out/Remove/Hide all product's base prices in the product catalogue
Don't want any base price in the product price and not needed to show this record in the product catalogue.
Below is the setup for the above case:
Step 1: Filter applied in ProductSelectionSchema (Not Working)
getProductInBasePriceListEsq: function(basePriceList) {
var basePriceListProductEsq = this.getBaseESQ("Product");
var customPriceList = Terrasoft.SysSettings.cachedSettings.UsrcustomPriceList;
var productPricePrefix = "[ProductPrice:Product:Id].";
basePriceListProductEsq.rowCount = 40;
var productGrade = this.sandbox.publish("productGradeMessage", null, "productFilterGradeMessage");
basePriceListProductEsq.addColumn("Price", "ProductPrice");
basePriceListProductEsq.addColumn(productPricePrefix + "Price", "Price");
basePriceListProductEsq.addColumn(productPricePrefix + "Currency", "Currency");
basePriceListProductEsq.addColumn(productPricePrefix + "Tax", "Tax");
basePriceListProductEsq.addColumn(productPricePrefix + "Tax.Percent", "DiscountTax");
basePriceListProductEsq.addColumn(productPricePrefix + "PriceList", "PriceList");
basePriceListProductEsq.addColumn(productPricePrefix + "UsrProductGrade", "UsrProductGrade");
basePriceListProductEsq.addColumn(productPricePrefix + "UsrIsActive", "UsrIsActive");
//Additional Filters for Grade and Active product
basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "PriceList.Id", customPriceList));
basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "UsrProductGrade", productGrade.value));
basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "UsrIsActive", true));
this.applyAdditionalFilters(basePriceListProductEsq);
this.initializePageableOptions(basePriceListProductEsq);
basePriceListProductEsq.filters.addItem(
this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL,
"IsArchive", false));
return basePriceListProductEsq;
},
Step 2: Made the value "Base" inactive from pricelist lookup (still all the products base price list is shown).
None of the filters applied is working. Instead, it shows the products that are matched with new pricelist value in the pricelist lookup for other products which doesn't has new value it takes the base price list and displays.
Any insight on this would be highly appreciated!
BR,
Bhoobalan Palanivelu.