back to top

Passing Values from a Page to a New Record in a Detail in Creatio

If you have a page with a detail and you need to pass values to the detail page when creating new records, you have two main choices. First, you could use an EntitySchemaQuery on the onEntityInitialized of the detail page to read the values from the record for the page. A second, better route, is to simply set the values on the new detail record automatically from the page without the need for a query or any additional code.

When you add a detail to a page, the wizard will add an entry into the page code in the details section. It looks something like this (this sample is a detail added to an account page):

details: {
    MyDetail: {
        schemaName: "UsrMyObjectDetailSchema",
        entitySchemaName: "UsrMyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "Account"
        }
    }
}

Let’s say we want to pass the account’s Type column value to the detail when we are creating new records in the detail and put it into a column named UsrDetailType in the detail. We can simply add the following to do this.

details: {
    MyDetail: {
        schemaName: "UsrMyObjectDetailSchema",
        entitySchemaName: "UsrMyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "Account"
        },
        defaultValues: {
            UsrDetailType: {masterColumn: "Type"}
        }
    }
}

What the above is saying is take the value from Type on the “master” record (in this case the Account) and put it in the column named UsrDetailType on the detail record. Note, this only applies when creating a new record in the detail. If you’re editing a record the current value in UsrDetailType won’t get overwritten. Also, keep in mind that the “defaultValues shown in the code above can have multiple sets of values you’d like to pass from the page to the detail record. For example, if we also wanted to pass Industry, in addition to Type, it would look like this:

details: {
    MyDetail: {
        schemaName: "UsrMyObjectDetailSchema",
        entitySchemaName: "UsrMyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "Account"
        },
        defaultValues: {
            UsrDetailType: {masterColumn: "Type"},
            UsrDetailIndustry: {masterColumn: "Industry"},
        }
    }
}

Of course, all of this only works if there’s a corresponding column in the detail record. This could mean an actual column in the detail object, but it could also mean an attribute on the detail page as well. Of course, if you need more flexibility, you could resort to using an EntitySchemaQuery from the detail page to read any values you need.

Note, you can also set values in the detail that aren’t based on columns in the master record as well. As a simple example, let’s say you want to set a date column named UsrMyDate to the current date. That would look like the following:

details: {
    MyDetail: {
        schemaName: "UsrMyObjectDetailSchema",
        entitySchemaName: "UsrMyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "Account"
        },
        defaultValues: {
            UsrMyDate: { value: new Date() }
        }
    }
}
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