back to top

Testing Creatio DevKit SDK Functions in Dev Tools Browser Console

One thing that I’ve always like doing to test things, specifically EntitySchemaQuery tests, was to simply test things out in the browser console. You could easily create an EntitySchemaQuery and test it without needing to go add it to a page, refresh, etc. Plus, it makes it easy to look at some data to troubleshoot without needing to look in the database etc.

However, for testing queries in the browser console with the Creatio DevKit SDK, there’s two things to overcome to be able to quickly test in the console. First, you need to get a reference to the DevKit, it’s not globally available like using Ext to create an EntitySchemaQuery object, and second, most of the functions are async. Luckily, these are easy to overcome. First of all, require is globally available, so we’ll use that to get a reference to the DevKit. Second, we can wrap the test code in an async function so we can await the promises returned by the functions.

This is what you would use in the browser console to test something using the DevKit SDK:

const sdk = require("@creatio-devkit/common");
(async() => {
    // your test code goes here
})();

Here’s a sample you can paste into your console to test the Model query from my last article:

const sdk = require("@creatio-devkit/common");
(async() => {
    const someAccountId = "ddd2c965-cd43-4c9e-8ee1-9783a5571be8";
     
    const accountModel = await sdk.Model.create("Account");
    const accounts = await accountModel.load({
        attributes: ["Id", "Name", "Type"],
        parameters: [{
            type: sdk.ModelParameterType.PrimaryColumnValue,
            value: someAccountId
        }]
    });
                         
    const account = accounts[0];
    console.log(account);
})();

Now you can easily test DevKit functions in the console. No need to add to a test page, save, refresh, and repeat.

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

Embedding a Creatio Chat Widget on your Website in Less than 5 Minutes

Creatio version 10X has an out of the box...

Query the Creatio Database to Locate Source Code or Client Schemas Containing a Value

Often when working with Creatio, I need to locate...

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.

Related Articles

Embedding a Creatio Chat Widget on your Website in Less than 5 Minutes

Creatio version 10X has an out of the box feature that allows you to easily embed a Chat...

Query the Creatio Database to Locate Source Code or Client Schemas Containing a Value

Often when working with Creatio, I need to locate code or client schemas based on their content, not...

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.

Related Videos