back to top

Adding Additional Filters to a Detail Added From a Lookup in Creatio

If you have a detail in Creatio where items are added from a lookup using the LookupMultiAddMixin, by default, this adds a filter so once an item is added to the detail, it is filtered out of the lookup (preventing a user from adding it twice). However, you can also add additional filters to this as well if needed.

The LookupMultiAddMixin includes a function called getAllLookupFilters. This is the function where it applies the filter to exclude items already added. We can override this function and get the filters from the parent function, and then add additional filters to apply. Let’s say in our case, we’re adding products to a detail via a lookup. Let’s also filter out inactive products:

getAllLookupFilters: function() {
	var filters = this.mixins.LookupMultiAddMixin.getAllLookupFilters.apply(this, arguments);
				
	// exclude inactive products
	filters.add(Terrasoft.createColumnFilterWithParameter(
		Terrasoft.ComparisonType.NOT_EQUAL, "IsArchive", true));
				
	return filters;
}

In the code above, the first line we are calling the base getAllLookupFilters function from the LookupMultiAddMixin. Because this function is from a mixin, we can’t just call this.callParent, instead we must invoke the function from the mixin. We get the filters from that function, then add our own.

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.

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