back to top

Starting a Process from Client-Side Code on a Creatio Freedom UI Page

In a previous article I outlined how to start or execute a process from client-side code on a classic Creatio page. This article will show you how to start a process from code on a Freedom UI page. Like most things in a Freedom UI page, we’ll start the process by using the HandlerChainService to initiate a crt.RunBusinessProcessRequest request. The HandlerChainService is a part of the Creatio DevKit SDK.

To use the devkit, you’ll need to add “@creatio-devkit/common” to the modules list of your page. This will look like this (note the “@creatio-devkit/common” in the square brackets and the sdk without quotes in the parenthesis):

define("UsrMyCustomEntity_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"] /**SCHEMA_DEPS*/, 
function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
	return {
		// ... the rest of the page here
	};
});

Now, with that module available, you can access things in the SDK, such as the HandlerChainService class. We’ll get an instance of the HandlerChainService, then execute the request, passing the process name (code) and can also include any parameters we need to pass into the process. Let’s take a look at the code below:

const handlerChain = sdk.HandlerChainService.instance;
const result = await handlerChain.process({
	type: "crt.RunBusinessProcessRequest",
	processName: "UsrSomeProcess",
	processParameters: {
		AccountId: await request.$context.Id,
		SomeParameter: "Some Value"
	},
	$context: request.$context
});
					
if (result.success) {
	// process was sucessfully executed
}

In the code above, we’re executing the process named “UsrSomeProcess”. This process has two parameters we’re passing into it (1) AccountId, which we’re populating from the Id on the page, and (2) a param named “SomeParameter”. It is executed and the result will tell us if it was started successfully.

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.

8 COMMENTS

  1. Hey Ryan. Maybe I’m barking up the wrong tree here completely…
    I am playing with an Angular Component, my plan was to use a Business Process to perform validation (a little more than a regex test), I was initially going to call a web service to do validation, but thought maybe the BP would be an easier way to manage the rules.

    Do you have any ideas how I could achieve this using a Business Process?
    I could call the BP from the web service…

    • Hi Gary,

      Yes, the only option is to create a configuration service and then call the service from C# code there. When executing a process via C# code, it *is* possible to get back the process params, so you could then return them from the service to the UI.

      Ryan

  2. Hi Ryan.

    I know this post is kind of old, but I ran into some issues and I pretty much exhausted other options, so in case you see this, here goes:

    This code works if I send a Guid as a parameter to the business process:

    const handlerChain = sdk.HandlerChainService.instance;
    const result = await handlerChain.process({
    type: “crt.RunBusinessProcessRequest”,
    processName: “QsProcess_Attach_files_to_the_email”,
    processParameters: {
    RecordIdParameter: “257b4c3f-949c-4b4c-bef9-30575da439d8”
    },
    $context: request.$context
    });

    However, if I try to send a text parameter, it always comes out null inside the logs, as well as when debugging, no matter what I try:

    const handlerChain = sdk.HandlerChainService.instance;
    const result = await handlerChain.process({
    type: “crt.RunBusinessProcessRequest”,
    processName: “QsProcess_Attach_files_to_the_email”,
    processParameters: {
    TestStrParameter: “test”
    },
    $context: request.$context
    });

    I can confirm both the names specified in the business process and the client module code for the parameter are correct, so no typo involved as far as I can see.

    Thanks in advance for your help, love the articles!

    Thanks,
    Laurentiu

  3. Hi Ryan.

    Know it is old post but still want to check whether this works. I have tried with a form which does not have any data source attached and passing a value — it does not work (similar to Laurentiu try)

    Please suggest some means to pass UI Parameter value to Process (other than GUID)

    Thanks and Regards

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