back to top

Responding to an Change Event When a Field is Changed on a Creatio Freedom UI Page

In classic Creatio pages, to wire up a change event for a field on the page you would use an attribute to determine the column and the function for the change event. However, to respond to a change event for a field in a Freedom UI page, you simply need to wire up a handler for a change request. This request is named “crt.HandleViewModelAttributeChangeRequest”. This request fires for any change on the page, for any field/attribute, so you need to add code for the field/attribute you want to be listening for changes in. One very nice addition to this request type in Freedom UI pages, is that it also provides the new value it was changed to and also the old value it was changed from.

To wire up a handler for this request, simply add a handler for the “crt.HandleViewModelAttributeChangeRequest” request to the page:

{
	request: "crt.HandleViewModelAttributeChangeRequest",
	handler: async (request, next) => {
		// listen for changes to the EmployeesNumber field
		if (request.attributeName === "EmployeesNumber" && !request.silent) {
			console.log("EmployeesNumber changed", request.oldValue, request.value);
		}
		
		return next?.handle(request);
	}
}

With the code above in place, any changes to the EmployeeNumber field will output the new and old values to the console. One important thing to note, this request also fires when the page loads and the field is populated from the record’s data. Using the request.silent will help you determine if the change was triggered by the page loading or by the user (or code) changing the value. When the page loads, request.silent will be true. However, if the user changes the field, or if you have code somewhere that programmatically changes the field’s value, in this case request.$context.EmployeeNumber = newValue, the request.silent will be false.

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

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