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

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.

Using the AI Prompt to Create Dynamic Folders in Creatio

Using Creatio's AI prompt to create the filter for a dynamic folder works best if you specifically ask for that, and if you are as clear and direct as possible about the filtering, conditions.

Related Articles

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 Videos