back to top

Adding Code to the Save Event of a Creatio Freedom UI Page

In classic pages in Creatio, if you wanted to add code to the page’s save event, you simply had to add a save function to override the base page save function, do your work, then use this.callParent(arguments) to call the base page save function (so it actually saves the page). In Freedom UI pages, if you want to do this, you’ll need to add a handler for the page’s save request, which is called crt.SaveRecordRequest. This article will take a look at how this is done.

In the page where you want to do something in the save event, locate the handlers section, then add the following code:

{
	request: "crt.SaveRecordRequest",
	handler: async (request, next) => {
		// Add any code to execute *before* the save here
		// This is useful to set values before the save so it saves with the record
		
		// Wait for the base page to execute it's handler to save the page
		const saveResult = await next.handle(request);
					
		// Add any code here to execute *after* the save has happened here

		// now return the saveResult
		return saveResult;
	}
}

It’s most typical that you’re wanting to do things *before* the save happens (so you can save values with the record). In that case, the above can be simplified to the following:

{
	request: "crt.SaveRecordRequest",
	handler: async (request, next) => {
		// Add any code to execute *before* the save here
		
		return next.handle(request);
	}
}
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