Hi Community,

 

I have this business requirement, where I need to calculate my "Monthly Total" field right after I finish loading my form page.

 

These are the formula and fields I want to calculate:

 

var total = (monthlySubTotal - discountAmount) + ((monthlySubTotal - discountAmount) * (taxRate / 100));

 

 

I tried to use "crt.HandleViewModelInitRequest" handler, but it didn't work. Because, the data is not fully loaded.

 

Is there any other handler that I can use, that waits for all the data to be loaded and then calculate my formula?

 

Thanks in advance.

 

Best Regards,

Pedro Pinheiro

 

 

 

 

 

Like 1

Like

4 comments
Best reply

 Hello. Try this.

{
	request: "crt.HandleViewModelAttributeChangeRequest",
	handler: async (request, next) => {
		if (request.attributeName === "UsrFirstField" || request.attributeName === "UsrSecondField") {
			//recalc
		}
		return next?.handle(request);
	}
}

 

 Hello. Try this.

{
	request: "crt.HandleViewModelAttributeChangeRequest",
	handler: async (request, next) => {
		if (request.attributeName === "UsrFirstField" || request.attributeName === "UsrSecondField") {
			//recalc
		}
		return next?.handle(request);
	}
}

 

Alex Zaslavsky,

 

Thank you for  the reply.

 

I'm using the "crt.HandleViewModelAttributeChangeRequest" handler when a field is being changed.



However, in this situation, the field does not receive any change. For example, the "Tax Rate, %" field has 15.00 as its default value. This does not trigger the "crt.HandleViewModelAttributeChangeRequest" handler. But I need it to calculate the "Monthly Total" field.



After some research, I found the "crt.LoadDataRequest" handler. This handler is executed after all the data has been loaded. So, for the moment, it's working for our requirement.

 

Best Regards,

Pedro Pinheiro

I think your "Tax Rate" field triggers this request, but it's silent.

request.silent

 

Alex Zaslavsky,

 

I've changed the solution and now it's working with the "crt.HandleViewModelAttributeChangeRequest" handler.

 

Thank you.

 

Best Regards,

Pedro Pinheiro

Show all comments

Hello,

 

 

Please let us know if there is any documentation that can help us create a radio button on Freedom UI

 

Thank you,

-Georges

 

Like 1

Like

2 comments
Best reply

Hello!



As a workaround, you can use the Checkbox fields:https://academy.creatio.com/docs/8.x/no-code-customization/customizatio…

Hello!



As a workaround, you can use the Checkbox fields:https://academy.creatio.com/docs/8.x/no-code-customization/customizatio…

Hello,

 

Thank you for your support.

 

Thank you,

-Georges

Show all comments

Dear colleagues,

 

I need to bind my section folder, but at this time it appears no available in Freedom, I saw in documentation https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor… and Folders are not available to bind

 

I'm using Creatio 8.1.1

 

Somebody knows some workaround to this?

 

Thanks in advance

Best regards

Julio Falcón

Like 1

Like

1 comments
Best reply

Hello!



Folders are stored in a separated table for each section, [object name]+Folder.

For example, for the contact section, it's ContactFolder.

For sections that were created exclusively in the Freedom UI, folders are stored in FolderTree.

 

Hello!



Folders are stored in a separated table for each section, [object name]+Folder.

For example, for the contact section, it's ContactFolder.

For sections that were created exclusively in the Freedom UI, folders are stored in FolderTree.

 

Show all comments

Hello,

 

Please we need the method of how we can create a custom handler on button click to create a loader after some actions are completed for example:

we have a button to trigger a business process, save the record, and show a message but the message takes a lot of time to show so we need to create a loader until the message shows, please let us know how we can do this.

 

Thank you,

-Georges

Like 0

Like

2 comments

I'm not sure that I understood your needs. 

I haven't tested it, but I believe that something like this would work.

define("UsrYour_FormPage", /**SCHEMA_DEPS*/[]/**SCHEMA_DEPS*/,
	function/**SCHEMA_ARGS*/()/**SCHEMA_ARGS*/ {
	return {
		viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
			{
				"operation": "insert",
				"name": "YourButton",
				"values": {
					"type": "crt.Button",
					"caption": "Your button caption",
					"color": "accent",
					"size": "large",
					"iconPosition": "only-text",
					"visible": true,
					"clicked": {
						"request": "usr.YourCustomRequest"
					},
					"clickMode": "default"
				},
				"parentName": "ActionButtonsContainer",
				"propertyName": "items",
				"index": 0
			}
		]/**SCHEMA_VIEW_CONFIG_DIFF*/,
		viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{}/**SCHEMA_VIEW_MODEL_CONFIG*/,
		modelConfig: /**SCHEMA_MODEL_CONFIG*/{}/**SCHEMA_MODEL_CONFIG*/,
		handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "usr.YourCustomRequest",
				handler: async (request, next) => {
					request.$context.maskService.showBodyMask();
					await //your logic
					request.$context.maskService.hideBodyMask();
					return next?.handle(request);
				}
			}
		]/**SCHEMA_HANDLERS*/,
		converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,
		validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/
	};
});

 

`showBodyMask` is working fine.
But, can we display custom Loader message?
Show all comments

I'm using the StartNewWithUserConnection function to start a large process in multiple threads. In fact, it turns out that only 5 threads can be launched at the same time, the rest wait for the previous ones to complete and only then are executed. I couldn't find it in the settings or documentation.

Is there a way to increase the number of concurrent threads?

Like 0

Like

3 comments

Hello!



This is configured in \Terrasoft.WebApp\ActorSystem.hocon. In the section /TaskExecutorActor, there is a parameter nr-of-instances = 5.

 

However, these changes can lead to a heavy load on the database or consume the CPU of the web server and result in poor overall system performance.

For example, if you have a dedicated server with, let's say, 32 cores on the web server, it's probably conditionally safe (assuming the database server is also powerful enough) to set it to 32 or even up to %number of cores% * 2.

Thank you, Alona, it helps!

Dmytro Nedilskyi,

Could you please specify what exactly is your business need so we could help you?

Show all comments

Hello, How to automatically run a process as soon as a page is opened

 

Like 2

Like

1 comments

Hello,

To achieve your goal, you will need to apply the development.

You can find basic examples for launching the process from the page from our partners CustomerFX:

1) Starting a Process from Client-Side Code on a Creatio Freedom UI Page

2) Programmatically Starting a Process from Client Code in Creatio

Thank you.

Show all comments

I tried returning false and not calling next?.handle(request), but the record still seems to get saved. In Classic UI it was possible to prevent saving by not calling the this.callParent method, which I believe is somewhat analogous to the next?.handle(request), but I guess not perfectly? Maybe I'm missing something.

Like 1

Like

1 comments
Best reply

Hello Harvey,

It is possible, and you do it in the right way as I can see from the description. To prevent saving you have to declare this handler in the scheme and simply do not call next?.handle(request). 

Hello Harvey,

It is possible, and you do it in the right way as I can see from the description. To prevent saving you have to declare this handler in the scheme and simply do not call next?.handle(request). 

Show all comments

Hi all,

 

I am required to set authentication for the Redis server (bitnami/redis image)  (Email server microservices) for production on-site deployment email server.

Setting the password from the docker-compose file using REDIS_PASSWORD : 123abc as the environment variable, creates the password authentication successfully. the issue I am having is specifying the new password in my Redis connection string which is used by ListenerAPI & ListenerWorker containers. 

The docker-compose file

 

version: "3.8"

services:

  redisOfficial:

    image: 'docker.io/bitnami/redis'

    container_name: 'redisOfficial'

    restart: unless-stopped

    environment:

      REDIS_PASSWORD : 123abc # redis Authentication mode

      REDIS_AOF_ENABLED : "no"

    ports:

      - "6379:6379"

     

  rabbitmqOfficial:

   image: rabbitmq:management-alpine

   container_name: 'rabbitmqOfficial'

   restart: unless-stopped

   volumes:

    - ./rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro

    - ./definitions.json:/etc/rabbitmq/definitions.json:ro

   ports:

    - 5672:5672 # AMQP protocol port

    - 15672:15672 # HTTP management UI

   

  ListenerAPI:

    image: registry.creatio.com/emaillistener:1.0.24

    container_name: 'ListenerAPI'

    restart: unless-stopped

    ports:

      - 10000:8080 # Port forward. External port:local port

#      - 10001:8443 # SSL port by default. Uncomment if https endpoint needed

    environment:

      ExchangeListenerRedisHost: redisOfficial:6379 # Redis connection

      ExchangeListenerRedisPassword: "123abc"

      ExchangeListenerRedisDatabase: 0 # Redis DB

      PodName: ExchangeListener

# SSL certificate parameters by default. Uncomment if https endpoint needed

#      ASPNETCORE_Kestrel__Certificates__Default__Password: password

#      ASPNETCORE_Kestrel__Certificates__Default__Path: /https/el_self_signed.pfx

    depends_on:

      - redisOfficial

      - rabbitmqOfficial

    volumes:

# SSL certificate folder by default. Uncomment if https endpoint needed

#     - ./ssl:/https:ro

     - ./appsettings.json:/app/config/appsettings.json:ro

     - ./rmqsecret.json:/app/config/rabbitmq.secrets.json:ro

#    dns:

#      - 10.0.7.1

#      - 10.0.7.2

#    dns_search:

#      - tscrm.com

     

  ListenerWorker:

    image: registry.creatio.com/emaillistener-worker:1.0.24

    container_name: 'ListenerWorker'

    restart: unless-stopped

    environment:

      ExchangeListenerRedisHost: redisOfficial:6379 # Redis connection

      ExchangeListenerRedisPassword: "123abc"

      ExchangeListenerRedisDatabase: 0 # Redis DB

      PodName: ExchangeListenerWorker

    depends_on:

      - redisOfficial

      - rabbitmqOfficial

    volumes:

     - ./appsettings.json:/app/appsettings.json:ro

     - ./rmqsecret.json:/app/appsettings.Production.json:ro

#    dns:

#      - 10.0.7.1

#      - 10.0.7.2

#    dns_search:

#      - tscrm.com\

 

When I run this container in docker, i am getting blow mentioned container log for the LisenterAPI container

2024-01-24 13:24:01 [Microsoft.AspNetCore.Server.Kestrel] 2024-01-24 07:54:01,426 [40] ERROR: Connection id "0HN0SM07SMRGL", Request id "0HN0SM07SMRGL:00000018": An unhandled exception was thrown by the application.

2024-01-24 13:24:01 StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). There was an authentication failure; check that passwords (or client certificates) are configured correctly.

2024-01-24 13:24:01    at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(ConfigurationOptions configuration, TextWriter log, Nullable`1 serverType) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 733

 

I suspect the way (syntax) password is specified docker-compose file is not supported for the LisenterAPI container. How to fix this issue?

 

Note: Container connections work fine because, if I use ALLOW_EMPTY_PASSWORD : "yes" for redis environment variable, the service works perfectly.

Like 0

Like

1 comments

Hello!



Docker is not a scalable option for development or pre-production environments. For Docker, we provide a ready-made docker-compose file.

We do not support connecting to Redis with a password in a configuration deployed in Docker. 

We recommend using Kubernetes to add password to REDIS in the Email Listener microservice:

https://academy.creatio.com/docs/8.x/setup-and-administration/on-site-d…

Show all comments

Hi all,



When this page opens, a process runs automatically, and the 'Mandatory Values' field is filled. The 'Mandatory Values' field specifies which fields should be compulsory to fill. Accordingly, based on the values in the 'Mandatory Values' field, I need to make related fields mandatory (required).

For example, if the 'Mandatory Values' field value is 'Package Name, Price,' I need to make the 'Package Name' and 'Price' fields required.

Can I run a function on the client side to make fields compulsory after the automatic process has run?

Like 2

Like

1 comments

I have an application that is going through rapid development iterations.  It would be nice to not have to rebuild the app from scratch every time.  A self-documenting application also appeals to me.

Some feedback on my experience of generating an app and why I say this is still a long way off:

  • Form page lists were not created (i.e., details).
  • Section names and column names have to be specified as valid identifiers (not so much natural language).
  • It’s not possible to set the prefix for an identifier for an app.
  • A progress bar was created for one section that I hadn’t asked for.
  • An email feed that I hadn’t asked for was included on one form.
  • Activities section was included which I didn’t particularly want.
  • Maximum of 500 chars for the text description, which is way too small.
  • All text fields seem to be 250 chars, would be nice to define this when describing the app.
Like 2

Like

1 comments

Hello!

 

We genuinely appreciate the time you've taken to share your insights with us. Your feedback is invaluable as it helps us understand your needs better and allows us to continuously improve our services.

To further investigate the issue you've encountered and address it more comprehensively, we kindly request you to contact our support team via email at support@creatio.com 

 

Thank you for choosing Creatio!

 

Best regards,

Kate

Show all comments