Hi Everyone, 

There is a sub process inside a main process, in which a web service (REST) is called but it is getting stuck due to operation timeout error (screenshot pasted). Our customer requested to bypass it if it is operation timeout so we checked that checkbox (Run current element in the background) in the subprocess. We thought that the main process now will not stop its execution even if the sub process stuck in the error state. But it is not and the main process is still stucking and not moving forward.

1. Following is the screenshot of the execution diagram of the main process where it got stuck at the subprocess - 

 

2. Following is the screenshot of the subprocess where the web service is called. 

3. Following is the screenshot of the error message - 

 

Can anyone please suggest how to handle this situation?

Thanks in advance.

Like 0

Like

3 comments

Sadly, there's no way to handle the timeout error in the process, it will only put the process in an error state - I do wish it was an option to handle that in the process rather than have the whole process error. 

Only option would be to increase the timeout for the web service call to possibly allow for the additional needed time. Otherwise, I've added script tasks that check for the service availability and can branch as needed to avoid the web service call, but that defeats the benefits of using the no-code web service components in the first place.

Ryan

Ryan Farley,

Thank you, if possible can you please share an example of how did you added script tasks that check for the service availability?

AS,

It was basically just C# that called one of the API methods and then set a param in the process so it knew to proceed or branch elsewhere. How that would look would depend on the API, but essentially you’re just writing code to call the API directly.

Show all comments

Hi Community,

I'm trying to add a new package(CrtCoreBase) in depend on package of certain package(my custom package), but I’m encountering the following error:

[SchemaData] [SysDetail_Activity]: Duplicate element name in the same package   [SchemaData] [SysImage_SectionIcon_Activity]: Duplicate element name in the same package [SchemaData] [SysModule_Activity]: Duplicate element name in the same package 

I have two list pages for the Activity object (one for incoming activities and another for outgoing activities). Could this setup be causing the issue?

Any suggestions on how to resolve this would be appreciated.

Thanks!

Like 0

Like

4 comments
Best reply

Hello,

Since both sections are tied to the Activity object, it's likely that the error comes from duplicated data bindings in the same package.

You can check the "Data Bound" tab to see which bindings are actually needed. If both are, consider slightly renaming the duplicates (e.g., SysModule_Activity_Incoming, ..._Outgoing) to avoid conflicts.

Alternatively, you could remove or move one of the bindings to another package, depending on your setup.

Best regards,
Ivan

Hello,

Based on the provided information, the error message suggests that there are duplicate element names within the same package. This issue typically occurs when multiple elements in the package share the same name.

To resolve this, we recommend checking the package that contains the Activity object to ensure there are no duplicate element names. Review the elements within the package and confirm that each one has a unique name.

If you identify any duplicates, you will need to rename one of the elements to make it unique within the package. Once the duplicate element names are resolved, you should be able to add the CrtCoreBase package as a dependency without encountering the error.

Best regards,
Ivan

Ivan Savenko,

Hi, 

I confirm that i have duplicate element like

 

But it  is safe to rename them because one is being used in incoming email message and other in outgoing email message (both section are connected to activity object).

 

Hello,

Since both sections are tied to the Activity object, it's likely that the error comes from duplicated data bindings in the same package.

You can check the "Data Bound" tab to see which bindings are actually needed. If both are, consider slightly renaming the duplicates (e.g., SysModule_Activity_Incoming, ..._Outgoing) to avoid conflicts.

Alternatively, you could remove or move one of the bindings to another package, depending on your setup.

Best regards,
Ivan

Ivan Savenko,

Hi,

I moved those duplicate elements to other package and now i am able to add new packages in depend on package.

Thanks

Show all comments

Hi Everyone,

We have a usecase where we have to apply the timer on a list to show how much time is left for resolution and it should be coloured dynamically.(i.e green when expected time is not reached and red when expected response time is exceeded)

Do anyone have any idea on how to achieve it?

 

Like 0

Like

1 comments

Hello!

You can definitely display the resolution time in the list, but unfortunately, applying dynamic coloring directly on the list records is not possible in the current version. However, we have registered the idea for consideration and possible future implementation by our R&D team.

As an alternative, you can consider adding the timer directly in the case record itself in Freedom UI list pages:

 

You can implement the timer feature within the individual case record:

Thank you!

Show all comments

Hi Community,

I'm working with Creatio Freedom UI and I need to embed a custom HTML layout along with some JavaScript logic (e.g., loading an external widget) into a page.

I’m looking for a proper way to add both:

  • Custom HTML code,

    .......

    </head>
    <body>
        <div style="width: 100%;">
            <div id="xyz1"></div>
            <div id="xyz2">
                <div style="width: 100%;">
                    <div id="queryBox" style="width: 100%;"></div>
                </div>
            <div  id="xyz3"></div>
            </div>
        </div>
    </body>
    </html>

  • External or inline JavaScript code (e.g., via <script> tags)

I've tried using custom components and inserting HTML using JavaScript (e.g., innerHTML), but I'm unsure if this is the recommended approach or if there's a native method provided by Creatio.

Could someone please guide me on:

  • The best practice for injecting HTML/JS into Freedom UI pages
  • Whether I can safely reference external JS/CSS (like from a CDN)
  • Any Creatio-supported way to dynamically render and control such elements

Thanks in advance! 
Any documentation links or working examples would be really helpful.

Regards,

Ajay Kuthe

Like 3

Like

1 comments
Best reply

Creatio does allow you to create your own custom UI components that you can add to the UI and even handle requests, read data, bind properties, etc. Documentation here on creating custom components: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/category/freedom-ui-component

Video tutorial here: https://www.youtube.com/watch?v=CE5uETqTsyQ&list=PLnolcTT5TeE2BMFf_XmJrSwpnbcLCLJkb

A simple approach (with limited capabilities compared to creating a full control) can be seen here: https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/ (you could use this approach to render any HTML, not just an IFRAME as the article shows)

Ryan

Creatio does allow you to create your own custom UI components that you can add to the UI and even handle requests, read data, bind properties, etc. Documentation here on creating custom components: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/category/freedom-ui-component

Video tutorial here: https://www.youtube.com/watch?v=CE5uETqTsyQ&list=PLnolcTT5TeE2BMFf_XmJrSwpnbcLCLJkb

A simple approach (with limited capabilities compared to creating a full control) can be seen here: https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/ (you could use this approach to render any HTML, not just an IFRAME as the article shows)

Ryan

Show all comments

Can we add our own external components in the portal ??

Like 0

Like

1 comments

Absolutely (assuming you're using Freedom UI pages in the portal). You can create custom components for any Freedom UI page. The fact that it's a page for external users does not limit the capabilities in any way.

If you're using classic pages in the portal, you can create custom elements, but the support for components isn't anywhere as complete as it is for Freedom UI pages.

Ryan

Show all comments

Hi Creatio Community,

I'm currently working with an editable detail grid, and I need to filter a lookup column (UsrPort) based on the connected user's roles ("Stay SPOC TC", "Stay SPOC Casablanca", "Stay SPOC Jorf Lasfar", "Stay SPOC Laayoune", and "Stay SPOC Safi").

I've tried several approaches including:

  • Defining lookupListConfig with prepareList binding (works fine on regular pages but does not trigger in editable grids).



    Here's the latest implementation I've tested:
     

generateActiveRowControlsConfig: function(id, columnsConfig, rowConfig) {
    this.mixins.ConfigurationGridUtilitiesV2.generateActiveRowControlsConfig.call(this, id, columnsConfig, rowConfig);
 
    var scope = this;
 
    Terrasoft.each(rowConfig, function(columnItem) {
        var columnKey = columnItem.key && columnItem.key[0];
        if (columnKey && columnKey.name === "UsrPort") {
            columnItem.controlConfig = columnItem.controlConfig || {};
            columnItem.controlConfig.lookupListConfig = columnItem.controlConfig.lookupListConfig || {};
            columnItem.controlConfig.lookupListConfig.filter = function() {
                var filters = Terrasoft.createFilterGroup();
 
                // Example of role checks
                var allowedPorts = [];
                if (scope.get("IsStaySpocCasa")) allowedPorts.push("CASABLANCA");
                if (scope.get("IsStaySpocJorf")) allowedPorts.push("JORF LASFAR");
                // Add similar checks for other roles
 
                if (allowedPorts.length > 0) {
                    filters.add("PortFilter", Terrasoft.createColumnInFilterWithParameters("Name", allowedPorts));
                } else {
                    filters.add("EmptyFilter", Terrasoft.createColumnFilterWithParameter(
                        Terrasoft.ComparisonType.EQUAL, "Id", Terrasoft.GUID_EMPTY));
                }
 
                return filters;
            };
        }
    }, this);
},

This configuration currently doesn't work and results in the error mentioned above.

Could someone help clarify the correct way to implement role-based filtering on lookup columns within editable detail grids? If anyone has successfully implemented this or faced a similar issue, your guidance would be greatly appreciated!

Thanks in advance for your help!

Best regards,

Like 0

Like

2 comments

For classic details, rules implemented on the page are also manifested in the list for the detail. I believe you can just implement the filtering for the lookup on the page for the detail, then it will work in the list as well. 

Thank you Ryan  for your answer!
Actually, my detail is an editable grid. I noticed that the page-level lookup filtering doesn't propagate into editable grids automatically. From my tests and observations, the editable grids seem to require explicit filtering logic within the generateActiveRowControlsConfig method instead.
Could you please confirm if this understanding is correct, and perhaps suggest any best practices or examples explicitly for editable grids?

Show all comments

I am trying to create a folder in the Contacts Freedom UI List Page that only contains Contact records that are currently active. I know there is a field in the System Administration Object that is an Active status field (shown in the Users list page). I am trying to access this field; however, it is not showing up in the dropdown list of columns in the filter builder popup page. Any help would be great. I attached an image showing the columns currently visible to me for that System Admin Object. 

Like 0

Like

2 comments
Best reply

It would look like this - I typically also add Type=4 for users (although that’s a little redundant) and also add Connection Type=0 to get employee users (not external/portal users). 

Basically, from your screenshot, click "Quantity". Then set count > 0 (or click count to change to exists), then add the sub-conditions under that.

Ryan

It would look like this - I typically also add Type=4 for users (although that’s a little redundant) and also add Connection Type=0 to get employee users (not external/portal users). 

Basically, from your screenshot, click "Quantity". Then set count > 0 (or click count to change to exists), then add the sub-conditions under that.

Ryan

Ryan Farley,

Thank you Ryan for your time and help! This solution worked for me. 

Show all comments

I need to create a mask for this text field, it is a document, which has 11 digits, and is written as follows: ###.###.###-##.

I also want to limit the quantity and leave only periods and hyphens for typing.

The quantity entered is 11, but with the mask it becomes 14, I don't know if it is possible to block this.

Can anyone help me with this?

{
	"operation": "insert",
	"name": "Input_CPF",
	"values": {
		"type": "crt.Input",
		"multiline": false,
		"label": "$Resources.Strings.PDS_SCCPF_luo5kno",
		"labelPosition": "auto",
		"control": "$PDS_SCCPF_luo5kno"
	},
	"parentName": "FlexContainer_6gej1t9",
	"propertyName": "items",
	"index": 1
}
Like 0

Like

2 comments
Best reply

Hello,

 

In order to create the mask for the text field you can add a handler that will apply formatting to the text field value when user are typing.

 

You can use the following code snippet as an example:

 

{
	request: "crt.HandleViewModelAttributeChangeRequest",
	handler: async (request, next) =&gt; {
		if(request.attributeName == "PDS_SCCPF_luo5kno"){
			let value = await request.$context.PDS_SCCPF_luo5kno; 
			value = value.replace(/\D/g, ""); // Remove non-digit characters
			if (value.length &gt; 11){
				value = value.slice(0, 11); // Limit to 11 digits
			}
			let formatted = "";
			if (value.length &gt; 0) {
				formatted += value.slice(0, 3);
			}
			if (value.length &gt;= 4) {
				formatted += "." + value.slice(3, 6);
			}
			if (value.length &gt;= 7) {
				formatted += "." + value.slice(6, 9);
			}
			if (value.length &gt;= 10) {
				formatted += "-" + value.slice(9, 11);
			}
			request.$context.PDS_SCCPF_luo5kno = formatted;
 			request.preventAttributeChangeRequest = true;
		}
		return next?.handle(request);
	}
}

Hello,

 

In order to create the mask for the text field you can add a handler that will apply formatting to the text field value when user are typing.

 

You can use the following code snippet as an example:

 

{
	request: "crt.HandleViewModelAttributeChangeRequest",
	handler: async (request, next) =&gt; {
		if(request.attributeName == "PDS_SCCPF_luo5kno"){
			let value = await request.$context.PDS_SCCPF_luo5kno; 
			value = value.replace(/\D/g, ""); // Remove non-digit characters
			if (value.length &gt; 11){
				value = value.slice(0, 11); // Limit to 11 digits
			}
			let formatted = "";
			if (value.length &gt; 0) {
				formatted += value.slice(0, 3);
			}
			if (value.length &gt;= 4) {
				formatted += "." + value.slice(3, 6);
			}
			if (value.length &gt;= 7) {
				formatted += "." + value.slice(6, 9);
			}
			if (value.length &gt;= 10) {
				formatted += "-" + value.slice(9, 11);
			}
			request.$context.PDS_SCCPF_luo5kno = formatted;
 			request.preventAttributeChangeRequest = true;
		}
		return next?.handle(request);
	}
}

Thanks so much.
It worked wonderfully.

Show all comments

Hello;
In my 7.17 version i create a file repository override class and it work correctly
when I try to upgrade to 8,2,1 the FileService core class change and it create fileRepository object based on interface not class (ClassFactory.Get) and it run based method loadFile not override one.
Is it any solution to set the the default class for interface

Like 0

Like

5 comments

Hi,

Yes, starting from version 8.x, Creatio uses dependency injection (DI) more actively, including for services like IFileRepository, which is now resolved via ClassFactory.Get&lt;IFileRepository&gt;().

To override the default implementation, you can register your custom class as the default for the interface in the dependency container.
 

Solution: Register your class for the interface

You have to create your own AppEventListener and bind your class to the appropriate interface there.

 

public class UsrAppEventListener : AppEventListenerBase
{
	public override void OnAppStart(AppEventContext context) 	{
		base.OnAppStart(context);
		ClassFactory.Bind&lt;IFileRepository, CustomFileRepository&gt;(reuseType: ReuseType.Singleton);
    }
}

 

Where:

  • CustomFileRepository is your custom class that implements IFileRepository
  • ReuseType.Singleton (or None) depends on your usage

⚠️ Important: Ensure your class fully implements the IFileRepository interface.

This way, when FileService calls ClassFactory.Get&lt;IFileRepository&gt;(), it will receive your custom implementation.

TU Irina

Tomasz Branicki,

Hi Irina.
I finally manage to upgrate creatio properly so i can try your sollution.
write now i gut such error

Terrasoft.Core.InstanceActivationException
 HResult=0x80131600
 Message=Error creating an instance of the "Terrasoft.Configuration.IFileRepository" class
 Source=<Cannot evaluate the exception source>
 StackTrace:
<Cannot evaluate the exception stack trace>

 This exception was originally thrown at this call stack:
   [External Code]

Inner Exception 1:
ActivationException: Error activating IFileRepository
More than one matching bindings are available.
Matching bindings:
 1) binding from IFileRepository to FileRepository
 2) binding from IFileRepository to UsrFileRepository
Activation path:
 1) Request for IFileRepository

Suggestions:
 1) Ensure that you have defined a binding for IFileRepository only once.

My class is describe like that

    [Terrasoft.Core.Factories.Override]
   public class UsrFileRepository : FileRepository.

can you give me a hand :)

regards
Tomek

Iryna Oriyenko,

Hi Irina.
I finally manage to upgrate creatio properly so i can try your sollution.
write now i gut such error

Terrasoft.Core.InstanceActivationException
 HResult=0x80131600
 Message=Error creating an instance of the "Terrasoft.Configuration.IFileRepository" class
 Source=<Cannot evaluate the exception source>
 StackTrace:
<Cannot evaluate the exception stack trace>

 This exception was originally thrown at this call stack:
   [External Code]

Inner Exception 1:
ActivationException: Error activating IFileRepository
More than one matching bindings are available.
Matching bindings:
 1) binding from IFileRepository to FileRepository
 2) binding from IFileRepository to UsrFileRepository
Activation path:
 1) Request for IFileRepository

Suggestions:
 1) Ensure that you have defined a binding for IFileRepository only once.

My class is describe like that

    [Terrasoft.Core.Factories.Override]
   public class UsrFileRepository : FileRepository.

can you give me a hand :)

regards
Tomek

Iryna Oriyenko,

Hi Iryna;
I find solution
I used rebind except bind.
thank you for help

 

regards Tomek

Show all comments

So i'm making a simple Creatio app where I want to upload an image, encode it in base64 format, and pass it via WebService to my application.

 

I made a simple page with a button that calls business process where WebService is called.

I also added attachment component, uploaded a few images, and can successfully access the last image in my business process via formulas (get it's name, info ect.)

 

I don't have much experience in C#, so I'm kindly asking if someone could give me an example code how to read the image in Script Task named Base64 Encoder, after it's been fetched in "ImageReader" task, and return/forward encoded B64 image to "API CALL" task.

 

Thanks in advance!

Like 0

Like

7 comments

Hello,

 

First you should add Process file element to your business process where you can get the file and keep it for further usage in the process.

Then in Script Task you can retrieve that file and apply encoding. You can use the following code as an example

 

var files = context.Process.FindFlowElementByName("ObjectFileProcessingUserTask1").GetPropertyValue("ObjectFiles") as ICompositeObjectList&lt;ICompositeObject&gt;;
foreach(var file in files)
{
	if(file.TryGetValue&lt;EntityFileLocator&gt;("File", out EntityFileLocator fileLocator))
	{
		IFile fileItem = UserConnection.GetFile(fileLocator);
		using (System.IO.Stream stream = fileItem.Read())
		{
			/* Retrieve the file content and save it to the array. */
			var content = stream.ReadToEnd();
			var encodedContent = Convert.ToBase64String(content);
			Set&lt;string&gt;("EncodedFile", encodedContent);
		}
	}
}

 

Here ObjectFileProcessingUserTask1 is the name of Process file element in the business process.

Also don't forget to include Terrasoft.File and Terrasoft.File.Abstractions namespaces to the business process. In order to do that open the business process designer, go to the Methods tab and add the namespaces to the Usings list.

You can find more information about file processing in the articles:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/process-elements-reference/system-actions/process-file-element
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Thank you so much for the response.

I have successfully compiled my BusinessProcess, but how do I access 'EncodedFile' in my other tasks?

For example, I want to display it inside Auto-generated page, but I don't see my ScriptTask among my Process Elements in Formula window.

Please have a look at the “Process parameters” tab, as the result of the script execution is written to the “EncodedFile” process parameter

Considering it is a Base64 string, which process parameter type should I choose? Unlimited length text?

 

Also, I would like to get image width and height in the code and save it to parameter as well.

How can I get them in code?

Since Base64 string might be long Unlimited length text type will be a good choice for the parameter that will be used for storing it.

 

In order to get and save image width and height first you have to create 2 process parameters of type Integer (e.g.  ImageWidthParam and ImageHeightParam). Then in Script Task you can get the values using the following code:

 

using (System.IO.Stream stream = fileItem.Read())
{
	using (Image img = Image.FromStream(stream))
	{
		Set&lt;int&gt;("ImageWidthParam", img.Width);
		Set&lt;int&gt;("ImageHeightParam", img.Height);
	}
	/* Retrieve the file content and save it to the array. */
	var content = stream.ReadToEnd();
	var encodedContent = Convert.ToBase64String(content);
	Set&lt;string&gt;("EncodedFile", encodedContent);
} 


Also add System.Drawing namespace to the business process the same way as you added Terrasoft.File and Terrasoft.File.Abstractions namespaces.

 

Thank you so much for the replies!

 

Only thing that doesn't work is that EncodedFile seems to be empty.

When I try to print it inside AutoGeneratedPage as a text field it shows nothing, and when I forward it in a WebService .json body to my API there is no data.

 

Process file element is fetching last 10 records from uploaded files, I tried looking up uploaded files and there are test images there, so there should be valid input to my ScriptTask.

 

Is there something about Process Parameter "EncodedFile" that I should set up differently except setting its type as Unlimited length text? Everything else I left at default values.

The problem that EncodedFile parameter is empty could be that the stream position is at the end, so when you call stream.ReadToEnd(), there's nothing left to read.
You can update a proposed code a bit to make sure that stream position is not at the end before reading from it.

 

/* Retrieve the file content and save it to the array. */
var content = stream.ReadToEnd();
var encodedContent = Convert.ToBase64String(content);
Set&lt;string&gt;("EncodedFile", encodedContent);
using (MemoryStream imageStream = new MemoryStream(content))
using (Image img = Image.FromStream(imageStream))
{
	Set&lt;int&gt;("ImageWidthParam", img.Width);
	Set&lt;int&gt;("ImageHeightParam", img.Height);
}

 

Also I would recommend to debug Script Task code in Visual Studio in case you have some issues to make sure that it's executing as expected.

Show all comments