Filtering “Contact” by Career in Calls Freedom UI ListPage

Hello Creatio Community,

I’m working on the Calls section in Freedom UI and need to filter the Contact lookup by the related ContactCareer -> Account link. On the FormPage, I have the following handler which works correctly:

{
  request: "crt.LoadDataRequest",
  handler: function(request, next) {
      if (request.dataSourceName !== "PDS_Contact_yzb6a3h_List_DS") {
          return next.handle(request);
      }
      var account = request.$context.attributes["PDS_Account_9l7yfn9"];
      if (account) {
          var filter = {
              filterType: 6,
              isEnabled: true,
              items: {
                  CustomFilter: {
                      filterType: 1,
                      isEnabled: true,
                      comparisonType: 3, // Equal
                      leftExpression: {
                          expressionType: 0, // SchemaColumn
                          columnPath: "[ContactCareer:Contact].Account"
                      },
                      rightExpression: {
                          expressionType: 2, // Parameter
                          parameter: {
                              dataValueType: 0, // GUID
                              value: account.value
                          }
                      }
                  }
              }
          };
          request.parameters.push({
              type: "filter",
              value: filter
          });
      }
      return next.handle(request);
  }
}

Now I need to apply exactly this filtering logic to a DataTable on the ListPage (editable grid), but I can’t get it to work.

Has anyone successfully implemented a similar filter for a Freedom UI ListPage DataTable?

Could you please share a code example or best practice?

Thank you in advance for any guidance or samples!

Like 0

Like

0 comments
Show all comments