back to top

Dynamically Setting the Printable Template for the Process File Element in a Creatio Process

The Process File process element allows you to do things such as generate a printable in a Creatio process. The printable to use for the Process File is something that you must select at the time when you’re designing the process. This property does not allow you to select a process parameter to use for the template.

I had a business need to select a printable template type that could vary based on the record type. To accomplish this, I needed to be able to dynamically set the template to use in the process file element. There are some options to set this template dynamically at runtime using a script task, however, this will only work for the following conditions:

  1. You must select a default template for the process file element since the designer requires one to be selected
  2. The default template you select must be based on the same object as the templates you are setting dynamically. This is so you can properly set the filter for the record(s) used for the printable. You have to set this filter at design time, so the object the printable template is based on must be the same or the filter will be invalid.

As long as the conditions above are met, you can easily set the printable template in the process file at runtime using the steps below.

  1. Set up the Process File element in the process normally (using the default template as specified above)
  2. Add a process parameter (which can be of type unique identifier or of type lookup using object “Printable”). This is where you will set the printable template to actually use in the process. In my case for the code below, I named this process parameter “PrintableTemplate”.
  3. get the actual name (Code) of the process file element. To do this, click the top right ellipsis button on the process file element and select “advanced mode”
  4. Get the Code value of the process file element (this will be used in the script task code). Note, for my process file element, the code is “ReportFileProcessingUserTask1”
  5. Now add a script task. In this script task, we’ll first get the value of the process parameter containing the printable template to use (in my case, named “PrintableTemplate”). Then, we’ll set this as the template for the process file element, which is stored in the “ReportId” property
var reportId = Get<Guid>("PrintableTemplate");
Set("ReportFileProcessingUserTask1.ReportId", reportId);
return true;

That is it. Now, when the process runs, it will dynamically set the printable template to use for the process file element.

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