back to top

Calling Configuration Web Services from Client Side Code in a Creatio Freedom UI Page

One of my favorite features in Creatio is the ability to create web services that you can call from client side code. This allows you to do heavy operations on the server and then consume it from the client, making an overall better user experience. I wrote about how to create and consume web services in a previous article. This article will show how to do this from a Freedom UI Page.

View previous article: Creating a Web Service and Consuming it From Client-Side Javascript in Creatio

Refer to the previous article for details on how to create the web service itself This article will only focus on how to consume it from a Freedom UI Page. In Creatio 8.0.6 and later, there is a new DevKit SDK which provides various modules for doing different things. We’ll be using a module named HttpClientService in this article to consume the web service.

To use this 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 HttpClientService. We’ll need to create an instance of it, then we’ll have methods available such as get and post to call the service. Using the same web service defined in the previous article, our code would look like this:

// NOTE: in this example, my source code schema is named "UsrSourceCode1" 
// and a method named "SayHelloTest", which takes a single string parameter named "Name"

var payload = {
	Name: "Ryan"
};

const httpService = new sdk.HttpClientService();
const response = await httpService.post("rest/UsrSourceCode1/SayHelloTest", payload);
Terrasoft.showInformation(response.body.SayHelloTestResult);

In the example above, there’s a few things to point out that are different than before when using ServiceHelper (as outlined in the previous article):

  1. We provide the relative URL for the service as “rest/ClassName/FunctionName”
  2. We retrieve the result using the same name as before, but its a property of the response body
  3. The request returns a promise, which we can await, if wanted, rather than as a callback

Also, something to note about HttpClientService, it can also be used to call external services as well. If the URL is prefixed with http or https, it understands that this is an external URL and will not prefix the base URL of the system. The HttpClientService module contains several methods for calling a URL. In the example above, we’re calling the “post” method, but also available is: get, post, delete, put, and patch.

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. Hello,

    Thank you for your article. Since Creatio doesn’t post much information about the devkit, I found that information quite helpful.

    Do you have anything regarding other SDK classes? Say, EntitySchemaQuery?

    • Thank you Serghiy. I will have many articles to come on the topic of the new devkit. I am trying to work out the details for using an EntiySchemaQuery via the devkit, however, as you mentioned, since there is no documentation yet a lot of the figuring out takes some time with trial and error.

      As for ESQ, you can still perform an Extjs ESQ like before, however, it uses a callback whereas the new ESQ in devkit is async. Hopefully I’ll have that topic figured out and an article written up shortly.

      All of the articles I have, so far, about the topic of devkit can be accessed here https://customerfx.com/article/tag/devkit-sdk/

      Ryan

  2. Thank you

    But I have a question. I have a WS created by Creatio app wizard ( drag-drop ) not from the C# service code, And I can used it in BP and call the BP in the client JS.

    My question is Can I call my WS from Client JS direct without BP

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