Getting Multi-select Records from a Creatio Freedom UI List via Code

Creatio 8.1 and higher supports multi-selected records in lists. You can add an action for the list, which get’s added to the list’s bulk actions bar at the bottom. You can pretty easily get the selected records in your own request handler code.

The first step is to add your own button to the list’s bulk actions bar.

When you do this, you’ll be setting up the action request handler in code in the same way you do for buttons (see article here). In the handler, the key part is to get the selected records. In order to do that, you’ll need to know what the attribute is that the List stores the selections in. The List will have a “selectionState” property where you’ll see this. Here’s a sample from a list:

{
	"operation": "merge",
	"name": "DataTable",
	"values": {
		"selectionState": "$DataTable_SelectionState",
		// ...
}

In that sample above, you can see the selectionState is bound to the attribute named “DataTable_SelectionState” (the $ is not a part of the name, that is what indicates it is bound to an attribute named that). The list will use an attribute named “DataTable_SelectionState” to store the selections. The value of that attribute will be an object that has a property named “selected” which will be an array of Id’s for the selected records. In the request handler you set up for the bulk actions button, you’d use the following to get the array of selected Id values:

const selectedIds = (await request.$context.DataTable_SelectionState).selected;

Note, in the code above, we’re getting the value of the DataTable_SelectionState attribute (and awaiting the result), then getting the selected property of the object returned. Now you can do whatever is needed with each Id, such as execute a process or perform some other bulk action.

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.

7 COMMENTS

  1. Hi Ryan,

    I’m trying to get the selected items from a grid detail, but it doesn’t work.
    It seems is not available the request.$context.xxx_SelectionState object.

    • For a list that is not a section list (like a detail) the attribute name is not going to be “DataTable_SelectionState”. You’ll need to look at the DataGrid element in the page code to determine the name of that attribute.

  2. Hello Ryan!
    thank you for the quick reply.
    If a user selects all items using the top checkbox the (await request.$context.DataTable_SelectionState).selected is undefined.
    In this case the (await request.$context.DataTable_SelectionState) returns { Type: “All” … }

    • This is true. When all are selected there is no selected property but instead an “unselected” property, however, I don’t think you can get an array of the selections (even the Items property only shows the first page of records). I believe i’ve seen that this is a current bug with a fix coming in next version?
      I believe some of the out of the box bulk actions work against the list’s datasource rather than the selected items.

    • I am not sure if this is still an issue in current versions. As for a workaround, might want to check with support (it’s not likely there is one until they add a fix for the issue)
      Ryan

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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.

Using the AI Prompt to Create Dynamic Folders in Creatio

Using Creatio's AI prompt to create the filter for a dynamic folder works best if you specifically ask for that, and if you are as clear and direct as possible about the filtering, conditions.

Related Articles

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 Videos