back to top

Iterating Through All Properties Bound to a Page in Creatio (formerly bpm’online)

There might be times when you need to iterate through all properties bound to a page in Creatio. I recently needed to implement a reset/clear button for a form where all entered values would be cleared. I didn’t want to hard-code all the properties since there were many, also, that would mean I’d have to update the code anytime a new property was added.

Luckily, this is pretty easy to do. Note, the method I’ll be describing here will iterate through all the properties of the object the page is bound to, not just the ones added as elements to the page itself. The page has a object called model, which has all the attributes for the bound object. Note, there are other types of attributes for the page, not just the object columns. What I typically do is look for my prefix (such as “Usr”) and only get those properties since they will represent the columns for the bound object.

Let’s take a look at the code:

for (var property in this.model.attributes) {
    // make sure we're only getting the object properties by using our prefix
    if (property.length > 3 && property.indexOf("Usr") !== -1) {

        // if you want to exclude certain properties, you could check for them here
        if ( property !== "UsrSomePropertyId" && property !== "UsrOtherProperty") {

            // if you want to clear the properties you could set all to null
            this.set(property, null);
            // etc...
        }
    }
}

Again, this is iterating through the properties of the model, or bound entity object, not only the ones added to the page. When using this approach, be aware that there are many more attributes on a page than just the bound object properties, so be sure to take a look at what you’re getting back from this.model.attributes so you’re sure it is what you’re after.

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