Hi community,

I’m working on a custom web service in Creatio that connects to an external PostgreSQL database deployed on Neon. My goal is to query data from this external database, acting like a custom ORM. However, I’m running into an issue with using the Npgsql package inside Creatio’s source code.

 

I’ve added the necessary references, but I keep getting the following error:

The type or namespace name 'Npgsql' could not be found (are you missing a using directive or an assembly reference?)

 

I’ve already added the Npgsql.dll to the Terrasoft.web/bin folder and modified the web.config to include a binding redirect for Npgsql. After restarting the IIS server and flushing Redis, I now get a 'System.Data.Common' assembly error.

Here’s the code I’m using:

using Npgsql;
using System;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;
using System.Data;
using System.Collections.Generic;
using Terrasoft.Core;
using Terrasoft.Web.Common;
 
namespace Terrasoft.Configuration
{
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class PostgresService : BaseService
    {
        private string connectionString;
 
        public PostgresService()
        {
            // PostgreSQL connection string
            connectionString = "Host=your_host;Port=5432;Database=your_database;Username=your_username;Password=your_password";
        }
 
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetData")]
        public List<Dictionary<string, object>> GetData()
        {
            var result = new List<Dictionary<string, object>>();
            try
            {
                using (var connection = new NpgsqlConnection(connectionString))
                {
                    connection.Open();
                    string sql = "SELECT * FROM users LIMIT 100";
 
                    using (var cmd = new NpgsqlCommand(sql, connection))
                    using (var reader = cmd.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            var row = new Dictionary<string, object>();
                            for (int i = 0; i < reader.FieldCount; i++)
                            {
                                row.Add(reader.GetName(i), reader.GetValue(i));
                            }
                            result.Add(row);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception($"Error retrieving data: {ex.Message}");
            }
 
            return result;
        }
 
 
 
    }
}

 

Like 0

Like

0 comments
Show all comments

Hello Creatio Community,

I am working on a project where I need to either replace or override an existing Creatio web service with a custom implementation. Specifically, I want to extend or modify the functionality of a base Creatio web service (e.g., CallServiceSchemaService) to fit my business requirements.

Here’s what I want to achieve:

  • Create a custom web service in a separate package without affecting the existing functionality of the base service.
  • Either extend the existing service (if possible) or completely replace it with my custom implementation.
  • I want to customize the behavior of how service requests and responses are handled, while ensuring that all references to the original service use my new service.

Questions:

  1. What is the best approach to achieve this in Creatio? Should I extend or replace the service, and what are the steps to do so?
  2. How can I ensure that the system references my custom service in place of the base service without breaking existing functionality?
  3. Are there any best practices or limitations I should keep in mind when implementing custom web services in Creatio?

I would appreciate any guidance, examples, or documentation that can help me with this process.

Thank you!

Like 0

Like

1 comments
Best reply

Hi,

 

We would recommend not to redo the standard web service page, but to set up a custom service.

Here are the options for configuring the integration:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/architecture/development-in-creatio/integrations

Hi,

 

We would recommend not to redo the standard web service page, but to set up a custom service.

Here are the options for configuring the integration:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/architecture/development-in-creatio/integrations

Show all comments

I am trying to open a page for an object that I have created in a business process, but the page isn't showing up in the dropdown menu for the "Open edit page" process element.

 

The closest I have come to a solution is on this post from 2020, where someone said that in order for it to show up you need to use "out-of-the-box" or "standard" tools to create the page and not development tools. 

 

What are these tools that I can use to create a freedom UI page that will show up?

 

The method I used to create the page which isn't showing up is by clicking on the "+" sign on the "Pages" tab of the object editing page.

 

Edit: To clarify, I'm looking to have a modal page appear as part of the process. If I create a new freedom UI section, the auto generated page will appear in the "Open edit page" dropdown, but no other pages I create for it afterwards will.

Like 0

Like

3 comments

Hello,

Can you please provide screenshots of the configured business process?

Malika,

 

Here is a screenshot of the process element in question. I am trying to have the modal page show up instead, but I do not know what I am doing wrong.

Hello,

 

During case execution, the Open edit page case element will display the edit page of a new or existing Creatio section record. For example, open an account page to view or edit the account information as part of the case.

 

If you need to open a modal page, you can use the Pre-configured page process element.

Show all comments

Hello!
I have encountered such problems, maybe someone knows how to solve them?

There is a configured queue and a process that processes a queue item.

 

 

The first problem is that when opening the Cases_FromPage page the Case state is not loaded into the progress bar

 

 

The second problem I encountered is that it is necessary to close the page automatically and terminate the process element so that the queue element is considered processed, but this problem is solved with the help of this request:

{
	request: "crt.HandleViewModelInitRequest",
	handler: async function(request, next) {
		this.applyMethods(request.$context);
		await next.handle(request);					
	},
	applyMethods: function(context) {
		let methods = {
			closeProcessElement: async function() {
				const state = window.history.state;
				if (state && state.isProcessCardInChain && state.executionData && state.executionData.isOpened) {
					const executionData = state.executionData;
					const result = await context.executeRequest({
						type: "crt.CompleteProcessElementRequest",
						processElementUId: executionData.currentProcElUId,
						$context: context
					});
				}
			}
		};
		Ext.apply(context, methods);
	}
},

 

But another problem arose when changing the Case stage, in this case manually, the page doesn't always close.

I noticed that this behaviour on those stages where DCM has elements of activity creation.

In my case here:

When changing the stage from Waiting for Evaluation to Evaluation, the page should have closed.

The crt.CompleteProcessElementRequest request was executed.

Who knows what could be the problem?
Thanks!

Like 0

Like

1 comments

Hello,

 

Please contact our support team directly at support@creatio.com and make sure to describe each problem in a separate request so we could properly analyze and process these issues.

Show all comments

Hello,

 

In the classic UI, there is an element that allows you to send emails, chat, etc. that is towards the top of the page by default and looks like the following screenshot:

next steps communication pannel

How can I get the same functionality in Freedom UI? I am specifically asking because I am trying to use the Twilio SMS Connector app (the rightmost icon), and can't seem to figure out how you are supposed to manually send a text message in Freedom UI pages outside of this option other than building a business process from scratch. If I need to I can do so, but if there is already a solution I would prefer to use that.

 

Thanks in advance for any and all help!

Like 1

Like

1 comments
Best reply

Hello!

There are no plans to add channels in the near future, but it may be available as a Marketplace add-on in the future.

We have registered your request for implementation in future releases. However, you can still use the classic UI if Freedom doesn't meet your needs for various reasons.

If you have any additional questions, please reply to this email. We'll be happy to assist you.

Best regards,
Anton

Hello!

There are no plans to add channels in the near future, but it may be available as a Marketplace add-on in the future.

We have registered your request for implementation in future releases. However, you can still use the classic UI if Freedom doesn't meet your needs for various reasons.

If you have any additional questions, please reply to this email. We'll be happy to assist you.

Best regards,
Anton

Show all comments

I have a record that I'm trying to delete, but just as the title says, the system is telling me that I do not have the rights to any CRUD operations despite me being the system user and making sure that I have full operation permissions on the object.

 

The specific object in question is the AppValidation object from the FinAppLending package. The record was created automatically by a business process. Is there something I'm missing that will allow me to do anything with this object?

 

Thanks in advance!

Like 0

Like

4 comments
Best reply

Hello,
 

Having verified all information, we inform you that in order to work with the Validation object, you must need the finserv lending creatio license, which grants you access to modify the Validation object.

So please check if you have this license.

Hello,

Do you have a license finserv lending creatio app assigned to your user?

Malika,

Yes, I have all available licenses in my system and I am marked as the system user, so I have full access permissions for everything already. 

Hello,
 

Having verified all information, we inform you that in order to work with the Validation object, you must need the finserv lending creatio license, which grants you access to modify the Validation object.

So please check if you have this license.

Malika,

 

Thank you for your help

Show all comments

In the default Addresses expanded list, there is a column called "Full address" which combines all of the different parts of the contact address object into one, and cannot be edited directly, such as in the following screenshot.

I'm having trouble figuring out how this is implemented, as I would like to do something similar for another object. Any help would be appreciated, because I cannot seem to think of a search term that would pull up a relevant article on the subject.

 

Thanks in advance for any help!

Like 1

Like

4 comments
Best reply

That is implemented in BaseAddressEventListener. It’s basically an entity event listener class. See more about those here: https://customerfx.com/article/adding-code-to-listen-for-entity-events-in-creatio/

Ryan

That is implemented in BaseAddressEventListener. It’s basically an entity event listener class. See more about those here: https://customerfx.com/article/adding-code-to-listen-for-entity-events-in-creatio/

Ryan

Obviously, you can do that pretty easily with a process too. 

I imagine that I'll also have to code in the fact that it's non-editable?

That is just a rule at the object level

Ryan

Show all comments

As the title says, we sometimes need to disable buttons while still showing them - something which was easy to do in Classic UI. Is there any way of doing so in Freedom UI? I can't see any examples in OOTB Freedom UI areas, anywhere that does have disabled buttons OOTB are in Classic UI sections (e.g. the "Finish session" button on the System User page on the Access Rules tab when no record is selected).

Like 1

Like

4 comments
Best reply

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Hi Harvey, 

Does it not work to bind an attribute to the enabled property of a button and set as true/false? I've not tried that, but I assume it would work? Have you already tried that?

Ryan

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Huh, not sure how I missed that, could've sworn I tried doing that! Thanks both.

As a note, the only way I could find to put some kind of hint/tooltip on the button when it's disabled is by using the "title" property, which gives you a standard browser tooltip display when hovering the mouse over the button. And binding that to an attribute that you change to be blank when the button is enabled.

Show all comments

Hello community, 

I want to test sending an email function in Trial site

Can it possible?

Thanks 

Like 0

Like

4 comments

Hello,

 

It is possible to send the emails from the trial version of the site.

However, you have to set up the app password on the Google side.

 

Detailed information can be found here: https://support.google.com/accounts/answer/185833?hl=en

 

Happy to help!

Hi Hanna Skalko,

According to the two pictures I posted above, I turned off feature 2-Step Verification, then entered my email and password (I went to Google and login Email to confirm that both are corrected). However, Trial reports an incorrect email or password error.

It is not possible, is it?

Đặng Văn Chức,

Many email services no longer allow basic auth ad instead require OAuth. To use gmail in a trial you must:

  1. Turn on 2-step verification
  2. Set up an app password (only allows you to do this if 2-step verification is on)
  3. Use the app password for the password when adding the account to the trial

Ryan

Show all comments

Is it possible to set the value of a System setting which has the "Save value for current user" setting enabled for a specified user from C# code, e.g. from a script task? I've found the below code for setting a System setting, but presume that if the checkbox for the above is selected, then it will only set the value for the current user (or the System User if running in the system context):

var settingCode = Get<string>("UsrSystemSettingCode");
var value = Get<string>("UsrSettingValue");
Terrasoft.Core.Configuration.SysSettings.SetValue(UserConnection, settingCode, value);
return true;

 

We need to be able to set the per-user system setting for a specific user (determined by data in the BP in our case) but looking at the (always hard to find) API documentation, it doesn't seem like there's an overloaded version of SetValue that allows you to do so as a specified user - except possibly one that is marked as being deprecated in a much older version:

 

Like 0

Like

3 comments

Anybody have any info on this?

Does anyone have any other methods for managing per-user system settings in Creatio? It seems like there aren't a lot of options besides setting them in JS code when a user does a given action, but then that feels like it defeats some of the purpose of system settings being that the value doesn't have to be calculated every time a user does something, and also means it can't reliably be used for tasks like setting a default field value on an entity.

Contemplating using this methodology for running code when a user logs in to set it, hopefully it will work. Would be nice to have some clean way of doing it though, especially since we don't really need to be calculating it every time a user logs in but just when certain data changes: https://customerfx.com/article/executing-code-in-creatio-application-an…

Show all comments