i want download an attached file on Creatio, using this endpoint:
https://miinstance.com/0/odata/ContactFile(f7946070-164d-48d3-8516-c31aff3f1588)/Data
But, don't work, If I consult directly without data, I receive the data, but to add /Data i receive the 204 status, y try with demo instance and works!, but in my production enviroment i always get the 204 status

 

{
    "@odata.context": "https://astec.creatio.com/0/odata/$metadata#ContactFile/$entity",
    "Id": "cd7641f2-8e9f-00c5-6662-c68f0f2dd298",
    "CreatedOn": "2025-05-16T22:46:30.610332Z",
    "CreatedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
    "ModifiedOn": "2025-05-16T22:46:31.525903Z",
    "ModifiedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
    "Name": "Abril 2025.pdf",
    "Notes": "",
    "LockedById": "00000000-0000-0000-0000-000000000000",
    "LockedOn": "0001-01-01T00:00:00Z",
    "TypeId": "529bc2f8-0ee0-df11-971b-001d60e938c6",
    "Version": 1,
    "Size": 135896,
    "ProcessListeners": 0,
    "ContactId": "35e409d2-c8fd-4790-9adf-43ff73abfc3e",
    "SysFileStorageId": "65e42805-0e6d-43c9-8784-32b555f08421",
    "FileGroupId": "efbf3a0d-d780-465a-8e4b-8c0765197cfb",
    "Tag": "",
    "TotalSize": 135896,
    "Data@odata.mediaEditLink": "ContactFile(cd7641f2-8e9f-00c5-6662-c68f0f2dd298)/Data",
    "Data@odata.mediaReadLink": "ContactFile(cd7641f2-8e9f-00c5-6662-c68f0f2dd298)/Data",
    "Data@odata.mediaContentType": "application/octet-stream"
}
Like 0

Like

4 comments

Hello,

Here are a few possible reasons for this behavior and some directions on where to start the investigation:

1. A 204 response usually means the endpoint was found, but the file content is zero bytes. This can happen if the file wasn’t uploaded correctly or if there’s an issue with the file storage. You can confirm this by checking the file size directly in the database, for example:
SELECT DATALENGTH([Data]) AS Bytes
FROM   ContactFile
WHERE  Id = 'f7946070-164d-48d3-8516-c31aff3f1588'
If this returns 0, the problem is likely at the storage level, not the API.

2. In production, the file may be stored in an external location like AWS S3, Azure Blob, or a network share. In this case check the ActiveFileContentStorage system setting is correctly configured.

If your website is using an S3 storage and since it's an external storage there is no possibility to use OData to get files from it. 
In this case we recommend to use a FileApiService in case you need to work with files on your website.

Nick Ovchynnik,

 

Nick Ovchynnik,

Hi Nick, I noticed that the storage is on S3, but I tried to create a web service with FileApiService to retrieve these documents attached to an object, but I wasn't successful. Not to mention creating a ScriptTask didn't work either.
Do you have a working example of how to do this?

Hi,

This article describes the operations with the files. Specifically, under the "Retrieve the file content" expandable tab.

If you face a specific issue with some part of the code, please submit a ticket to support@creatio.com so our team can address the error you got and suggest a solution.

Nick Ovchynnik,

Nick, finally i can make a webservice that, download a base64 of the selected document, let the code here, for help others with the same need.
Thank you very much.

namespace Terrasoft.Configuration.UsrFileRetrievalServiceNamespace {
    using System;
    using System.IO;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using Terrasoft.Web.Common;
    using Terrasoft.Core;
    using Terrasoft.Core.Factories;
    using Terrasoft.File;
    using Terrasoft.File.Abstractions;
 
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrFileRetrievalService : BaseService {
 
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
                   BodyStyle = WebMessageBodyStyle.Wrapped,
                   ResponseFormat = WebMessageFormat.Json)]
        public string GetFileBase64(string fileId, string schemaName) {
            try {
                // Validaciones básicas
                if (string.IsNullOrEmpty(fileId) || string.IsNullOrEmpty(schemaName)) {
                    return "Parámetros inválidos.";
                }
 
                Guid recordId = new Guid(fileId);
 
                // Creamos el localizador del archivo
                var fileLocator = new EntityFileLocator(schemaName, recordId);
 
                // Obtenemos la fábrica de archivos
                IFileFactory fileFactory = UserConnection.GetFileFactory();
 
                // Cargamos el archivo desde la base de datos
                IFile file = fileFactory.Get(fileLocator);
 
                // Leemos el contenido del archivo
                byte[] content;
                using (Stream stream = file.Read()) {
                    using (var ms = new MemoryStream()) {
                        stream.CopyTo(ms);
                        content = ms.ToArray();
                    }
                }
 
                // Convertimos a Base64 para retorno JSON seguro
                return Convert.ToBase64String(content);
            } catch (Exception ex) {
                return $"Error: {ex.Message}";
            }
        }
    }
}
Show all comments

Hi Community,

I'm currently using the RichText element in a Creatio Freedom UI page to load a static HTML page inside a Tab container. The HTML content is stored in a System Setting, and I retrieve this code at runtime to display it using the RichText editor.

For example, I read the HTML code from a System Setting and then attempt to render the full HTML (including inline styles) in the RichText element.

However, I'm facing an issue where inline styles or custom CSS seem to be stripped out.

Figure 1: Original Design Layout

Figure 2: Current UI Output

Has anyone else encountered this?

Any suggestions would be appreciated.

Thanks in advance!

Like 2

Like

0 comments
Show all comments

Below is the link I used, which I followed to a tee. I built the image with changed database string, testing the connections, verified Creatio is running, and still the container fails to start???

 

https://academy.creatio.com/docs/8.x/setup-and-administration/on-site-deployment/deployment-additional-setup/identity-service/set-up-the-identity-service-instruction#title-2002-6

appsettings.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Debug"
    }
  },
  "AllowedHosts": "*",
  "AllowedCorsOrigins": "[\"none.com\"]",
  "DbProvider": "Postgres",
  "DatabaseConnectionString": "Server=host.docker.internal;Port=5432;Database=creatio_db;User ID=postgres;password=testpassword123;Timeout=500; CommandTimeout=400;MaxPoolSize=1024;",
  "X509CertificatePath": "openssl.pfx",
  "Clients": "[{\"ClientId\":\"IdServiceUsers\",\"ClientName\":\"Bpmonline designer\",\"Secrets\":[\"665b6f638c2da3ecc5d3a1868eb9352f6e01ee4a\"],\"AllowedGrantTypes\":[\"implicit\",\"client_credentials\"],\"RedirectUris\":[\"http://localhost:4200\",\"http://localhost:4200/lib\",\"http://localhost:4200/lib/\"],\"PostLogoutRedirectUris\":[\"http://localhost:4200\"],\"IdentityTokenLifetime\": 300,\"AccessTokenLifetime\": 3600,\"Properties\": {\"AllowedQueryParameters\": \"[\\\"invitationHash\\\",\\\"targetSubject\\\"]\"},\"AllowedScopes\": [\"register_own_resource\", \"get_resource_list\", \"get_client_info\",\"find_clients\",\"remove_client\",\"update_client\", \"add_registrar_client\", \"IdentityServerApi\"]}]",
  "FeatureManagement": {
    "Full": true
  },
  "DbConnectionRetryOptions": {
    "MaxRetryCount": 5,
    "MaxRetryDelay": 6
  },
  "IgnoreDbCertificateValidation": true,
  "MsSqlCompatibilityLevel": 120
}
The Dockerfile:
 
FROM mcr.microsoft.com/dotnet/aspnet:8.0
 
WORKDIR /app
COPY . ./
 
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
ENTRYPOINT ["dotnet", "IdentityService.dll"]
The command I used to run the dotnet8 IdentityService:
 
docker run --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env=ASPNETCORE_URLS=http://+:80 --env=DOTNET_RUNNING_IN_CONTAINER=true --env=DOTNET_VERSION=8.0.10 --env=ASPNET_VERSION=8.0.10 --workdir=/app -p 80:80 -d creatio-identity-service:latest

Like 0

Like

4 comments

Hello,

Please try to set up the Identity Service logging (point 8 from this article) and then run it again to see if any additional details or errors are logged there. 

Mira Dmitruk,

I set that up as well after this post and the container fails to start, which returns no logs.

Hello,
If the container fails to start and produces no logs, even after enabling logging as per point 8 in the article, then the issue most likely lies at a runtime or container-level problem, before your application code even runs.

1. Check the Container’s Exit Logs
Run: docker ps -a
Look for the container that exited. Then: docker logs <container_id>
If logs are still empty, it crashed before application output - most likely a .NET runtime issue or entry point failure.

2. Try starting the container manually in interactive mode to see what's wrong:

docker run -it --rm creatio-identity-service:latest /bin/bash

Once inside: dotnet IdentityService.dll

Observe the error. Common issues:
- DLL not found (IdentityService.dll)
- Broken dependencies
- Misnamed or incorrectly copied files

 

3. Confirm the application runs outside docker. Just to rule out .NET or config issues, run: dotnet IdentityService.dll
in your host machine's CLI, from the same folder you're using in the Docker context. If it fails here, the issue is in appsettings.json or dependencies.

I resolved the issue, thank you for the advice. The issue was caused by a missing openssl file.

Show all comments

We are currently facing an issue with how incoming calls are handled within Creatio. When an incoming call is received, it is correctly routed to multiple available operator extensions simultaneously, which is expected behavior. However, the problem arises because Creatio is creating multiple call records — one for each operator to whom the call was redirected — even though only one of them actually answers the call.

We have a business process configured that is triggered upon the creation or modification of a record in the "Call" object. This process opens the customer profile page for the operator to assist in providing relevant information during the call.

The issue is that, due to multiple call records being created for the same incoming call, the business process is being triggered for all operators, not just the one who answers the call. As a result, the customer profile page is opening for all operators who received the call notification, which leads to confusion and unnecessary disruption.

Expected Behavior:
Only one call record should be created — specifically for the operator who actually answers the call. Consequently, the customer profile page should open only for that operator, not for everyone whose extension the call was redirected to.

Request:
We would appreciate your guidance or support in resolving this issue, either by adjusting the way call records are created or by providing a method to identify and limit the process execution to only the operator who answers the call.

Like 0

Like

3 comments

Hello,

Here’s how the basic logic works:

If a call appears on the CTI panel, it is automatically saved in the Calls section.
So, if a call is received by a group of 5 users, it will appear on the CTI panel for all 5 users. However, only one of them will actually answer the call.
As a result, 5 call records will be created in the Calls section, but only one will show that a conversation took place.

To avoid this, we recommend changing the call routing so that calls are directed to operators one at a time (sequentially).

This would require custom development, and unfortunately, we don’t have a ready-made example of this kind of implementation.



Best regards,
Malika

Hello, 

please take a look at this post: https://community.creatio.com/questions/cti-panel-answercall-method-ove… . Maybe it will help you in implementing similar logic in your process to what we did (trigger when user answers the call, instead when call record is created in database).

Best Regards,

Jelenko.

Jelenko Mršić,

Hello, 
Thank you for your response, I've tried using "Time to Connect" field as you have shown in your solution, but still the problem is not solved and when I checked incoming call is going to 4 different extension and only one operator is picking up the call but still the backend process is running for other operators too.

In the below screenshot the last column represent - "Time to Connect" value. 

 

Do you have any idea what could be the problem now?

Thanks.

Show all comments

Hi all,

I'm looking for a reporting tool for Creatio, where i can also use very complex queries. I'm user to work with tools like Microsoft reporting Services or Chrystal reports.  We're working in the cloud, and i don't find a tool that is comparable to those tools.  How do you all create such reports, and run complex queries  

Like 0

Like

3 comments

Hello!

 

In this case, we recommend exploring the Creatio Marketplace, where you can find a variety of reporting solutions that may meet your requirements, including those supporting advanced analytics and complex data processing.

 

Please follow the link: https://marketplace.creatio.com/catalog?search=report&check_logged_in=1&page=6

 

Have a nice day!

Sadly, no such reporting option currently exists for Creatio. We typically with extend the Word printables using a lot of custom macros for data retrieval and the use of views and have the complex logic performed in the view. For now, that is the best option.

Does anybody has any experience with the Power BI connector? I don't know Power Bi, but i was always under the impression that is was something like Reporting Services....

 

Show all comments

I am trying to open a document in MS Word desktop (like the online version of viewing MS Word can). This is possible by applying a prefix to the document URL on MS Teams. My code in the page already works good:

var docUrl = await request.$context.PDS_UsrColumn1_u8ye1ig;
const wordUrl = `ms-word:ofe|u|${encodeURIComponent(docUrl)}`;

But using the wordUrl variable on a Webinput field, or even a button.click event doing a window.location.ref always results in Creatio still encoding the Url. Creatio always adds the console message:

Launched external handler for 'ms-word:ofe%7Cu%7Chttps%3A%2F%2Fcompany.sharepoint.com%2F%yadayadayada

where it should be ms-word:ofe|u|https://

Does someone know how to bypass the encoding for a specific handler or for this page?

Like 0

Like

6 comments

Can you share the complete handler code and explain how have you disabled the "To protect you from unsafe content office has blocked opening this file" error message?

Sure, here is the handler. It already opens MS Word, but because of the safe url encoding it won't open the correct document... 

handlers: /**SCHEMA_HANDLERS*/[
            {
                request: "usr.PushButtonRequest",
                /* Implementation of the custom query handler. */
                handler: async (request, next) => {
                    this.console.log("Button Open in MS Word pushed...");
                     var docUrl = await request.$context.PDS_UsrColumn1_u8ye1ig;
                      const wordUrl = `ms-word:ofe|u|${encodeURIComponent(docUrl)}`;

                    // scenario 1: use window.location.href
                    //window.location.href = wordUrl;

                    // scenario 2: use the online found solutioon to add a link with a click
                    const link = document.createElement('a');
                    link.href = wordUrl;
                    link.target = '_blank';
                    link.rel = 'noopener noreferrer';
                    document.body.appendChild(link);
                    link.click();
                    document.body.removeChild(link);
                    
                    this.console.log("MS Word Url set to: " + wordUrl);
                    /* Call the next handler if it exists and return its result. */
                    return next?.handle(request);
                }
            },
        ]/**SCHEMA_HANDLERS*/,

Bas Kroes,

well I get the same URL in both cases (using a regular text field and the web link input) and in both scenarios I get this popup:

Maybe I am testing in the wrong manner?

Oleg Drobina,

It looks like it is a browser issue. I am using Ms Edge. What are you using?

Bas Kroes,

I am testing in Chrome, but I get the same error in Edge.

That's odd indeed using the same code 🤔

But your url did not get unwanted modified?

Show all comments

Hello, community, I'm new to Creatio. My client wants the printed order document to have a consistent order, meaning the products added to their order in the itemization area should be: tools at the top, services at the bottom.

Example:
Item 1 - cutter, 1 piece, amount 10
Item 2 - hammer, 1 piece, amount 3
Item 3 - shipping service, 1 piece, amount 10 (always at the bottom)

When capturing and sorting the products in the order, they get jumbled up, and the report doesn't respect the order.

Is there a way to tell Creatio to respect and sort the products and services in my printed report?

Like 0

Like

1 comments

Hello,

The sort column should be presented in the template to keep the sort order in the report and on the UI; in other words, the issue occurs because you have not added the column by which the fields are sorted on the UI to the template of your report. 

When the report is generated, the system ignores all columns that are not presented in the template, so data cannot be sorted by them. 

Our responsible R&D team is already aware of the described behavior and has registered the corresponding task to implement the functionality in the upcoming versions of the application.

Show all comments

While configuring OAuth authentication to call external web services, I cannot find a way to set grant_type=client_credentials. Is there a way to make configuration use client_credentials instead of authorization_code grant_type?

I also tried to configure a web service to directly call the IdP access token endpoint passing the grant_type I need, but I was not able to find a way to send the body content-type in application/x-www-form-urlencoded format.

Do you have any suggestions to get the OAuth token using client_credentials?

Like 1

Like

1 comments
Best reply

Greetings!

There’s no way to get this using the basic method - it doesn’t support sending form requests.
You’ll need to write a task script for that.

It requires writing C# code that uses WebRequest to send the request.
For example:

public bool Execute(UserConnection userConnection)
{
    var tokenUrl = "https://your-creatio-instance.com/connect/token";
    var clientId = "your_client_id";
    var clientSecret = "your_client_secret";
    var request = (HttpWebRequest)WebRequest.Create(tokenUrl);
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.Accept = "application/json";
    var postData = $"grant_type=client_credentials&client_id={HttpUtility.UrlEncode(clientId)}&client_secret={HttpUtility.UrlEncode(clientSecret)}";
    var data = Encoding.UTF8.GetBytes(postData);
    try
    {
        using (var stream = request.GetRequestStream())
        {
            stream.Write(data, 0, data.Length);
        }
        using (var response = (HttpWebResponse)request.GetResponse())
        using (var reader = new StreamReader(response.GetResponseStream()))
        {
            var responseText = reader.ReadToEnd();
            var tokenResponse = JsonConvert.DeserializeObject<OAuthTokenResponse>(responseText);
            // if you want you can do something with tokenResponse.access_token            
            return true;
        }
    }
    catch (WebException ex)
    {
        if (ex.Response != null)
        {
            using (var reader = new StreamReader(ex.Response.GetResponseStream()))
            {
                var errorText = reader.ReadToEnd();
                // Here also you can log the error or display it
                Console.WriteLine("OAuth error: " + errorText);
            }
        }
        else
        {
            Console.WriteLine("WebException without response: " + ex.Message);
        }
        return false;
    }
}

Regards, 
Orkhan

Greetings!

There’s no way to get this using the basic method - it doesn’t support sending form requests.
You’ll need to write a task script for that.

It requires writing C# code that uses WebRequest to send the request.
For example:

public bool Execute(UserConnection userConnection)
{
    var tokenUrl = "https://your-creatio-instance.com/connect/token";
    var clientId = "your_client_id";
    var clientSecret = "your_client_secret";
    var request = (HttpWebRequest)WebRequest.Create(tokenUrl);
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.Accept = "application/json";
    var postData = $"grant_type=client_credentials&client_id={HttpUtility.UrlEncode(clientId)}&client_secret={HttpUtility.UrlEncode(clientSecret)}";
    var data = Encoding.UTF8.GetBytes(postData);
    try
    {
        using (var stream = request.GetRequestStream())
        {
            stream.Write(data, 0, data.Length);
        }
        using (var response = (HttpWebResponse)request.GetResponse())
        using (var reader = new StreamReader(response.GetResponseStream()))
        {
            var responseText = reader.ReadToEnd();
            var tokenResponse = JsonConvert.DeserializeObject<OAuthTokenResponse>(responseText);
            // if you want you can do something with tokenResponse.access_token            
            return true;
        }
    }
    catch (WebException ex)
    {
        if (ex.Response != null)
        {
            using (var reader = new StreamReader(ex.Response.GetResponseStream()))
            {
                var errorText = reader.ReadToEnd();
                // Here also you can log the error or display it
                Console.WriteLine("OAuth error: " + errorText);
            }
        }
        else
        {
            Console.WriteLine("WebException without response: " + ex.Message);
        }
        return false;
    }
}

Regards, 
Orkhan

Show all comments

Hello Community,

I'm working on a login page and want to make the password field secure by hiding the input characters (so that they appear as "**" or dots).


What is the best way to do this in Freedom UI?

Any help or code examples would be appreciated. Thanks in advance!

Like 0

Like

1 comments

Open the code for the page and locate the Password field in the viewConfigDiff. Change the line: 

"type": "crt.Input"

To the following: 

"type": "crt.PasswordInput"

Ryan

Show all comments

Hello,

I tried to change the width of one of my Freedom UI mini pages, by adding the code below to the page. When I opened from the designer, it has the width that I want for a few seconds before changing back to the default width. What I'm missing?

Thanks,

Jose

 

          {
                "operation": "merge",
                "name": "Main",
                "values": {
                    "fitContent": true,
                    "layoutConfig": {
                        "width": 840
                    }
                }
            },

 

Like 0

Like

2 comments
Best reply

There's a feature you can add/enable called "EnabledAppearanceSettings" that turns on the ability to choose different sizes for the modal/mini pages. See more here: https://customerfx.com/article/changing-the-size-of-freedom-ui-modal-mi…

  1. Go to https://[creatiourl/0/flags
  2. Search to see if you have the feature named "EnabledAppearanceSettings" (you won't have it, but just to make sure. If not, click Add to add it, enter:
    1. Code = EnabledAppearanceSettings
    2. Enabled = checked
    3. Save, then click Clear Cache
  3. Now when you open the designer for a modal/mini page, you'll see some size options

Ryan

There's a feature you can add/enable called "EnabledAppearanceSettings" that turns on the ability to choose different sizes for the modal/mini pages. See more here: https://customerfx.com/article/changing-the-size-of-freedom-ui-modal-mi…

  1. Go to https://[creatiourl/0/flags
  2. Search to see if you have the feature named "EnabledAppearanceSettings" (you won't have it, but just to make sure. If not, click Add to add it, enter:
    1. Code = EnabledAppearanceSettings
    2. Enabled = checked
    3. Save, then click Clear Cache
  3. Now when you open the designer for a modal/mini page, you'll see some size options

Ryan

Ryan Farley,

Thanks. That's exactly what I was looking for.

Show all comments