Invoking a Multi-Select Lookup Dialog on a Creatio Freedom UI Page

Creatio 8.1 introduces two new features when it comes to lookups and lists. First, is the addition of a Lookup dialog (instead of the drop-down type lookup that has been the only option for lookups previously for Freedom UI). Second, is the ability to multi-select from lists, which includes the list on the new Lookup dialog. With that said, this article only works for version 8.1 and higher.

NOTE: This technique only works in Creatio 8.1 or higher

We’re going to look at how to programmatically invoke the new Lookup dialog and also how to allow for multiple items to be selected. For this article, we’ll allow multiple account types to be selected and then we’ll place the result in a text field on the page. The end result will be as follows:

To invoke the lookup dialog, we’ll execute a crt.OpenLookupPageRequest. We can pass parameters to this request, such as the entity to lookup and also whether we want the user to be able to select multiple items. For some reason, rather than await the results, we’ll include a callback function that will get invoked when the lookup dialog closes. We’ll be passed an array of the selected items in this function. This article will flatten this out to a string of comma-separated items and place in a text field. Let’s look at the code:

request.$context.executeRequest({
	type: "crt.OpenLookupPageRequest",
	$context: request.$context,
	entitySchemaName: "AccountType",
	//filtersConfig: add any filters here
	features: {
		select: {
			multiple: true,
			selectAll: false,
			resultType: 'lookupValues'
		},
		create: {
			enabled: false
		}
	},
	afterClosed: function(selectedItems) {
		// flatten out to a comma-delimited string and place in field
		const textValues = Object.values(selectedItems).map(item => item.displayValue).join(', ');
		request.$context.StringAttribute_2pp5ptx = textValues;
	}
});

Note you can also set a filter for the lookup and also pre-select items in the list – more on this in a future article.

Other Lookup Request Properties

A few other available properties that can be included in the request:

  • filersConfig: Add additional filters for the lookup
  • caption: Provide a different caption for the lookup dialog
  • schemaName: Provide an alternative lookup page to use for the requst
  • itemsAttributeName: Instead of providing an entitySchemaName proeprty, you can provide the name of an existing datasource on the page. This also allows the data source to be filtered when it requests it’s data for the lookup dialog.

In the near future I will be wrapping this all up as a reusable component for a Freedom UI replacement for my marketplace add-on Multi-Select Text Field.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

39 COMMENTS

  1. hi Ryan, excuse my Creatio noobie question, can you explain the difference / benefits between your existing Multi-Select text field and this new Lookup method please?
    i.e. which is better for reporting?

    • Hello Vincent,

      Creatio currently has two different page types. The page types that have existed since the beginning of Creatio are now referred to as “Classic” pages. The newer type of page is referred to as “Freedom UI” pages. The two types are both using very different tech behind everything.

      My existing Multi-Select text field control works only with classic pages – and will continue to work with classic pages only. This article outlines how to accomplish something similar on the newer Freedom UI page type. I will be creating a version of the Multi-Select text field for Freedom UI pages in the future.

      Hopefully that helps.
      Ryan

  2. Hi Ryan, thank you for your reply and explanation.
    Do your solutions enable reporting for each multiple value selected?

    Coming from experience with other CRM’s I’m very surprised Creation hasn’t included multiselect dropdowns/lookups within the core product.

    • As far as reporting, that is up to the report and how you want to view the data. The data is saved in the database as a comma-delimited string, so the data is there and available – depending on the report needs would determine if the comma-delimited string is useful or not.

  3. Hi Ryan, do you have any guides or info on how to apply the filters mentioned under filtersConfig at the bottom of this article? I can’t see any academy articles on how this should be configured, and it would be quite useful to be able to apply some filters to the lookup being shown.

  4. Hi Ryan,

    Can I have a full snippet code on the handlers? I am unsure how did this one worked. As of my understanding this one is an input text and not a lookup/combobox element.

    Thank you

  5. Ah, I see.

    That isn’t just a text input, but also a button. I added a button just next to the text input. The click of that button is what invokes the code in the article.

    To get the button placed like that, you could either move it with CSS or use a flex container with multiple columns. Then stretch the input across multiple columns and leave the last one for the button.

    • Hello Sarthak,
      I no longer have the CSS I used for this sample. However, it was pretty simple. Basically, I added a button that was an icon only. Then I used CSS to set its position to absolute and used top/left/etc as necessary to position over the right side of the text control.
      Ryan

  6. Hello Ryan,

    I need to implement a multi-select field on a Freedom UI Page, but in version 8.0.10.
    Do you have any suggestion to get this issue done?

    Thank you.

  7. Hi Ryan, with this new Lookup Dialog, is there a method you’re aware of for overriding the template to configure grid/list settings such as visible columns, default sort, etc on a per entity basis?

    That is, for example, whenever a Lookup Dialog is launched for a list of, say, Contacts, I’d like to have been able to setup the list to display more than just Name (and in a perfect world, to de-link Name or replace it with First/Surname columns so that users aren’t accidentally swept away to the Contact record).

    Apologies, this is gently related to the original post, but just as gently off-topic! Any ideas or even confirmation that it can’t be done would be super helpful.

  8. Hi Ryan,

    It seems that if no selection is done, afterClosed method is not launched. Do you know if there another method to trap this case ?

    • I don’t believe you can at this point. At least, none of the exposed properties seem to include support for this. Additionally, the sort is stored in the dialog’s list config. You could save the default layout for the list for all users (and bind the associated SysProfileData record to the package, if needed).

  9. Hi Ryan,
    any update on Multi-Select Text Field add on in creatio marketplace , I have a use case where i need to create an object that will add multiple account under a opportunity in a list

  10. Hi Ryan,
    I’m encountering an issue with the “selectAll: true” option in my dialog box. When I enable this setting, the “Select All” button becomes unresponsive, and it does not select any fields as expected.
    Could you please let me know if there are any additional configurations or settings required to enable the “Select All” functionality correctly?

    Below is the relevant code snippet from my handler:
    “`js
    {
    request: “Crt.CustomButton1”,
    handler: async (request, next) => {
    try {
    // Step 1: Open the lookup page immediately when the button is clicked
    await request.$context.executeRequest({
    type: “crt.OpenLookupPageRequest”,
    $context: request.$context,
    entitySchemaName: “AccountIndustry”,
    caption: “Select Industry Types”,
    features: {
    select: {
    multiple: true,
    selectAll: false,
    resultType: “lookupValues”
    },
    create: {
    enabled: false
    }
    },
    afterClosed: async function (selectedItems) {
    if (!selectedItems) {

    console.log(“No selection made”);

    return;

    }
    if (selectedItems && selectedItems.length > 0) {
    console.log(“Selected Items:”, selectedItems);

    // Step 2: Store selected industry types in the context for later use
    request.$context.selectedEventTypes = selectedItems;

    // Step 3: Flatten the selected items into a string
    const textValues = selectedItems
    .map(item => item.displayValue)
    .join(“, “);
    request.$context.AccountDS_UsrIndustryText_s5hzpn4 = textValues;
    console.log(“Industry types saved in context:”, textValues);
    } else {
    console.log(“No items were selected.”);
    }
    }
    });
    } catch (error) {
    console.error(“Error opening lookup page:”, error);
    }
    }
    },
    “`

    • Also, I believe when you’re using selectAll you don’t get back an array of selected Id values. Instead you get back the active filter in place when the select all was used and it’s up to you to use the filter to retrieve the records.

  11. Hello Mr. Ryan,
    I hope you doing well,

    I did what suggested in here and it worked fine with me,
    the only issue I have now is when click the three dots there is the delete option I want to remove this option

    • Technically uod have to override the base lookup page to remove those options, however, you could do it with CSS and not override that. I believe those might be removed in 8.3 (along with the hyperlink on records)

  12. Hi Ryan,
    Thank you for this post (and the others as well) — I use them a lot!

    I’m having a hard time adding a filter to a lookup window. I have a list of IDs and want to filter the lookup using a ComparisonType.In condition
    (for example: Contact Id IN [list of IDs]).

    Could you please provide a simple example I can copy?
    Thank you,
    Chani

  13. Tried this for a Lookup in v8.3.2, unfortunately I am getting only the Id in the selectedItems, no displayValue.

    sdk.HandlerChainService.instance.process({
    type: “crt.OpenSelectionWindowRequest”,
    scopes: […request.scopes],
    $context: request.$context,
    entitySchemaName: “UsrCustomType”,
    caption: “Select 1 or more Type”,
    features: {
    select: {
    multiple: true,
    selectAll: true,
    resultType: ‘lookupValues’
    },
    create: {
    enabled: false
    }
    },
    afterClosed: function(selectedItems) {
    debugger;
    const selectedValue = Object.values(selectedItems).map(item => item.displayValue).join(‘, ‘);
    request.$context.PDS_UsrText_r1di8zc = selectedValue;

    }
    });
    return next?.handle(request);
    }

    Is there a new way of doing this?

    • I got it fix. I should be using “type: “crt.OpenLookupPageRequest””. It returns displayValue and Id.

  14. For crt.OpenSelectionWindowRequest it does return only the ID values in the selectedItems. As you’ve found crt.OpenLookupPageRequest does return the displayValue as well, however just to note, crt.OpenLookupPageRequest is deprecated (although I don’t expect it will every get removed and will continue to be valid to use).

    For crt.OpenSelectionWindowRequest, it’s possible there’s some option for the “resultType” that could include the displayValue, however, I’ve never looked into what options are there.

    Ryan

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Building AI-Powered Workflows in Creatio Without Writing Code

See how Creatio can combine AI with no-code business processes to qualify, summarize, and route incoming leads while keeping your existing business rules and human oversight in place.

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Related Articles

Building AI-Powered Workflows in Creatio Without Writing Code

See how Creatio can combine AI with no-code business processes to qualify, summarize, and route incoming leads while keeping your existing business rules and human oversight in place.

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Related Videos