I've a form, where i want to apply cascade filtering based on lookup fields
here,
Category<Incident,Request
ServiceCatalog<Hardware,Software,Access
Service<VPN Access(Software),Laptop(Hardware) - does lookup to ServiceCatalog
KBase<kb-VPN(VPN Access), kb-laptop(Laptop) - does lookup to Service
i used this code, but it does not apply the cascade filtering
fd.beforeCreate(function(vueConfig) {
function filterProducts(category) {
var categoryId = category && category.LookupId || category || null;
fd.field('Service').filter = 'ServiceCatalog/Id eq ' + categoryId;
fd.field('Service').widget.dataSource.read();
}
fd.spRendered(function() {
fd.field('Service').ready().then(function() {
fd.field('ServiceCatalog').$on('change', function(value){
filterProducts(value);
fd.field('Service').value = null;
});
fd.field('ServiceCatalog').ready().then(function(field) {
filterProducts(field.value);
});
});
}};