I have a problem filtering a lookup filed using Freedom UI.
The issue here:
The first lookup filed linked to the Contact entity
The second lookup filed's entity Account, contains a field "SMPrimaryAccountOwner" and it should be equal to the first filed value.
Here is the filter:
{
request: "crt.LoadDataRequest",
handler: async (request, next) => {
// filter the contact lookup for the account
debugger;
if(request.dataSourceName !== "LookupAttribute_emk4fel_List_DS") {
return await next?.handle(request);
}
const account = await request.$context.LookupAttribute_r6avpkd;
if (account) {
const filter = new sdk.FilterGroup();
await filter.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "SMPrimaryAccountOwner.Id", account.value);
// note, these lines are only needed due to an issue with filters in Creatio-DevKit SDK
// expected to be fixed in Creatio 8.1
//const newFilter = Object.assign({}, filter);
//newFilter.items = filter.items;
request.parameters.push({
type: sdk.ModelParameterType.Filter,
value: filter
});
}
return await next?.handle(request);
}
}
And here is the error on the console:

Maybe anyone here had the same issue.