Hi All,
We are creating a pre-config page where we have two page parameters fields, one is a lookup (lookup 1) and other is multi select with another lookup. I have created a mapping of both the lookup tables. I want to filter multi select field based on the value selected in lookup 1. How can I implement this?
handlers: /**SCHEMA_HANDLERS*/[ { request: "crt.LoadDataRequest", handler: async (request, next) => { // Ensure this runs only for your MultiSelect list data source console.log("Current DataSourceName:", request.dataSourceName); console.log("EntitySchema:", request.entitySchemaName); // Ensure it's the right source + schema if (request.dataSourceName !== "MultiSelect_ugo4wdi_List_DS") { console.log("Hello I am in a log box 1234"); return await next?.handle(request); } const filter = new sdk.FilterGroup(); // Filter where ImpStateRegion == 'State' await filter.addSchemaColumnFilterWithParameter( sdk.ComparisonType.Equal, "ImpStateRegion", // <-- Column in ImpStateInterestMultiselect to filter on "State" // <-- The fixed value to filter by ); // Workaround for Creatio DevKit filter bug const newFilter = Object.assign({}, filter); console.log("Hello I am in a log box"); newFilter.items = filter.items; // Add filter to request parameters request.parameters.push({ type: "filter", value: newFilter }); // Proceed with next handler return await next?.handle(request); } } ]/**SCHEMA_HANDLERS*/,
Like
0 comments