Good afternoon!

I am trying to deploy deduplication-web-api using docker container registry.creatio.com/dup-web-api:3.0.12

 

I see this problem in the logs.

 

fail: Microsoft.AspNetCore.Server.Kestrel[13]
     Connection id "0HN5FOGURGKI1", Request id "0HN5FOGURGKI1:000000E2": An unhandled exception was thrown by the application.
     System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
        at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.Flush()
        at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
        at System.IO.StreamWriter.Dispose(Boolean disposing)
        at System.IO.TextWriter.Dispose()
        at App.Metrics.Formatters.Prometheus.Internal.AsciiFormatter.Write(Stream destination, IEnumerable`1 metrics, NewLineFormat newLine)
        at App.Metrics.Formatters.Prometheus.MetricsPrometheusTextOutputFormatter.WriteAsync(Stream output, MetricsDataValueSource metricsData, CancellationToken cancellationToken)
        at App.Metrics.AspNetCore.Endpoints.Middleware.MetricsEndpointMiddleware.Invoke(HttpContext context)
        at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

 

appsettings.json looks like this:

 

root@deduplication-web-api:/app# cat appsettings.json
{
 "Version": "1.0.0",
 "Logging": {
   "LogLevel": {
     "Default": "Warning"
   }
 },
 "Kestrel": {
   "AllowSynchronousIO": true
 },
 "AllowedHosts": "*",
 "ApplicationBasePath": "/",
 "MetricsOptions": {
   "Enabled": true,
   "ReportingEnabled": true,
   "GlobalTags": {
     "app": "deduplication-web-api",
     "env": "production"
   },
   "DefaultContextLabel": "deduplication-web-api"
 },
 "MetricsWebTrackingOptions": {
   "ApdexTSeconds": 0.1,
   "ApdexTrackingEnabled": false,
   "IgnoredHttpStatusCodes": [],
   "IgnoredRoutesRegexPatterns": [],
   "OAuth2TrackingEnabled": false
 },
 "MetricEndpointsOptions": {
   "MetricsEndpointEnabled": true,
   "MetricsTextEndpointEnabled": true,
   "EnvironmentInfoEndpointEnabled": true
 },
 "RabbitConfiguration": {
   "RabbitMQUri": "HIDDEN",
   "QueueName": "dup-start-deduplication-task",
   "ConnectAttempts": "5",
   "ReconnectInterval": "0.00:00:05",
   "NetworkRecoveryInterval": "0.00:00:05"
 },
 "RabbitPublisherConfiguration": {
   "QueueName": "dup-start-deduplication-task"
 },
 "DataServiceRestConfiguration": {
   "DataServiceUri": "http://deduplication-data-service/api"
 },
 "Logger4NetConfiguration": {
   "LoggerName": "bulk-deduplication-logger",
   "LoggerRepositoryName": "default",
   "LogFilePath": "/app/config/log4net.config"
 },
 "DuplicatesSearchConfiguration": {
   "DefaultMaxDuplicatesPerRecord": 100
 }
}

 

Can you please tell me what the problem could be?

Like 2

Like

3 comments

Hi Igor,

 

The basic appsettings.json does not mention "Kestrel": { "AllowSynchronousIO": true }. 

 

 

Could you please let us know if an error occurs without this parameter?

Sergii Zhmurko,


Yes, you are right, I found this solution on the internet but it didn't help.

Hi Igor,

 

Try redeploying the service with only the basic settings. If the error occurs again, please contact Creatio support, providing the logs of all containers and the docker-compose file you are using for deployment. 

Additionally, please include your server specifications in the request. We will then investigate the issue in more detail.

Show all comments

Hello all,

 

I have a client that is trying to add the communication options detail to the Portal user's Profile page in Freedom UI. However, it seems the User profile is no longer visibly connected to the User's contact record. How can we add the detail?

Like 0

Like

3 comments

Hello,

 

Could you please describe the end result that you would like to obtain and the exact steps that you are making?

 

Thank you!

Hanna Skalko,

I would like to add communication options to the user profile page as it could be in the Classic UI. (See below)Image of a Creatio Portal UI page that shows the user's name, address and communication options.

 

I would like to do the same in Freedom UI. However, when I open the Freedom UI user profile page, I haven't been able to find the connection the user's contact in order to add the same details to the page.

Has anybody been able to find an answer to this? Seems strange to me that the user profile can't connect directly to the Contact record in Freedom UI

Show all comments

Hello everyone! ,

 I've added new values to "Case category" Lookup, but when i choose one of them when setting up "List of Mailboxes for case registration" it doesn't send auto email response or any email in stage transition like "Service request" or "Incident" which already exists. 

 

so to sum up there is a problem with sending auto email in case i choose the new categories that i added to the lookup. (auto case registration works perfectly)

 

so does anyone is familiar with this problem so he/she can help me to solve it? 

 

and in case of manual registration, the emails is being generated as a drafts in the conversation tab, is there a way to not make it as draft and send it automatically like case registration by email?

 

thank you for your time.

 

Like 0

Like

2 comments

Hello!

Regarding notifications for new categories:
You need to configure the necessary rules in the lookup: ‘Case notification rule’.
 

If you have any issues with draft emails, please contact our support team at support@creatio.com

Best regards,
Anton

Anton Starikov,

Much appreciated 

Show all comments

Hello everyone,

 

I need to write a formula that subtracts Current date and time from Registartion date/time and the result is more that 4 hours (Current date/time - Registration date/time > 4 hours)

 

it's pretty urgent so i'll really appreciate if anyone knows the solution and provided it.

 

thanks in advance.

Like 1

Like

2 comments

([#System variable.Current Time and Date#] - [#RegistrationDateHere#]).TotalHours > 4

 

Ryan

Much appreciated Ryan, Thanks!

Show all comments

Hi team. I have a business need to add multiple records to the same table on the server side during process execution. 

What is the best approach to do so? 

I was looking into EntitySchemaManager functionality but couln'd find solution myself. I am able to add one record at a time (see example below) but this proves to be ineficient aEntitySchemaManager approach. 

 

var entitySchema = _userConnection.EntitySchemaManager.GetInstanceByName("UsrTableName");
           var entity = entitySchema.CreateEntity(_userConnection);
           entity.SetDefColumnValues();
           entity.SetColumnValue("UsrColumn1Id", id);
           entity.SetColumnValue("UsrDate", date);
           entity.Save();

 

Please, advice.

Like 0

Like

3 comments

Hi Iuliia, 
You could probably use the "Add element" with "Add from selection" mode selected. It's hard to tell having so few details. If you could tell a bit more details it'd make it easier to suggest something. 
 

Hello Iuliia,
Thank you for your question,

It would be nice if you could provide more details regarding issue that you are facing: your code, business process etc.

Yevhenii Grytsiuk, Yurii Sokil,

the (simplified) business process is next: 

user creates some record in UsrTableName_1 that has StartDate and EndDate, usually they are far apart (for example, long leave of absence, that last up to few month). 

For reporting purposes we need to have these dates stored as separate records, meaning for each date between StartDate and EndDate we need to have separate record added to UsrTableName_2. 

To do so I am able to loop through dates  between StartDate and EndDate and add necessry records one by one (using the code snippet provided by me above) but it is ineficient approach because of the multiple Save calls. 

What I want to do is to calculate all the necesary records, add/attach them and then call Save() only once, so there would be only one call to the DB to write the data. All this should be implemented on backend. Essentially I am looking for similar functionality that is provided by EntityFramework where one can call context.SaveChanges() after adding all records to the context (here is example how EF works https://learn.microsoft.com/en-us/ef/core/saving/basic#multiple-operations-in-a-single-savechanges) 

Does such approach exist in creatio? 

Thanks

 

 

 

Show all comments

Hi all,

 

Is there a settings to notify user when a ticket is open directly in the Case section?
 

We are basically registering cases through email, and it works fine, but if I register a case directly in the Case section there is no notification to the user.

 

User only receive email if I send an email from the case, meaning not automatically.

 

Any thougths?

Like 0

Like

2 comments

Hello,

 

This behavior can be achieved using the OOB functionality.

This article will help you with the setup: https://academy.creatio.com/docs/8.x/creatio-apps/products/service-tools/service-cases/case-settings/set-up-email-notifications

 

Please, pay attention to this block: https://academy.creatio.com/docs/8.x/creatio-apps/products/service-tools/service-cases/case-settings/set-up-email-notifications#set-up-contact-case-notification-rules

It will guide you through the necessary settings.

 

Hanna Skalko, 

Thank you, I will take a look on them

Show all comments

Добрий день. Робимо запрошення на портал через автоматичну реєстрацію (Налаштування-Налаштування порталу-Організаційні ролі на порталі-Обираємо організацію - На вкладці "Основна інформація" натискаємо на "+", обираємо "Додати нові контакти"-Вказуємо email і надсилаємо запрошення). У зв'язку з великою кількістю запрошень необхідно розуміти кому запрошення на портал вже були надіслані. Яким чином можна вивести цей параметр (запрошення надіслане) в контактах?

Like 0

Like

2 comments

Доброго дня!

На жаль, в контактах не зберігається подібна інформація, тому і вивести її не буде можливим. 

Ми вже зареєстрували побажання на додавання такого функціоналу в майбутніх версіях системи, тому сподіваємось на скорішу реалізацію цього функціоналу. 

Дякуємо, що допомагаєте нам покращувати нашу систему. 

З повагою,
Антон

Дякую за відповідь. Дуже чекаємо на дане доопрацювання.

Show all comments

Hello all,

 

I am working on Freedom UI interfaces for a client's self service portal. However our portal users are unable to open the User profile page to make changes to their information. When they click on the button in the top right where their user icon is, the portal user receives an endless loading screen.

 

The problem does not occur for internal users so I don't believe it's an error on the page. I can't find a permission related to it. Seems strange that portal users wouldn't be able to edit their profile

Like 1

Like

2 comments
Best reply

Hello,

Try the following steps:
1. Log in to your site (not portal) under Supervisor
2. Go to System Settings and select Enable2FA
3. Check the checkbox 'allow reading for portal users'
4. Have the portal user clear the cache and cookies in the browser and try to enter User profile again

Hello,

Try the following steps:
1. Log in to your site (not portal) under Supervisor
2. Go to System Settings and select Enable2FA
3. Check the checkbox 'allow reading for portal users'
4. Have the portal user clear the cache and cookies in the browser and try to enter User profile again

That worked! Thanks

Show all comments

Hello. In a section page, I need to make the case number font bold, but according to a specific field value. I tried to do it based on several articles (https://community.creatio.com/questions/how-add-custom-style-control-pa… https://community.creatio.com/questions/bigger-font-name-list-record-di…). 

But I'm running out of ideas. I would be grateful for your help!

Something like this, but only for case number text.

Like 1

Like

9 comments
Best reply

Сергій Сермакшев,

 

&lt is the html code for < symbol, it's a "feature" of the code editor here in the Community:)

 

As for ModifierType

We have access to items that will be displayed in the grid and their position will be the same as in the response.collection.collection.items. You can pass response to the performStylesChange method and process it there as well and perform the check for the needed ModifierType and change styles only for those records.

 

Something like:

define("CaseSection", [], function() {
	return {
		entitySchemaName: "Case",
		messages: {},
		attributes: {},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			onGridDataLoaded: function(response) {
				this.callParent(arguments);
				this.performStylesChange(response);
			},
 
			performStylesChange: function(response) {
				var processedItemsIndexes = this.checkResponseCollection(response);
				var recordTitles = document.getElementsByClassName("grid-primary-column");
				for (var i = 0; i &lt; recordTitles.length; i++) {
					for (var j = 0; j &lt; processedItemsIndexes.length; j++) {
						if (processedItemsIndexes[j] == i) {
							var element = recordTitles[i];
							element.style.fontWeight = 'bold';
						}
					}
				}
			},
 
			checkResponseCollection: function(response) {
				var responseItems = response.collection.getItems();
				var processItemsIndexes = [];
				for (var i = 0; i &lt; responseItems.length; i++) {
					if (responseItems[i].values.Status.displayValue == "New") {
						processItemsIndexes.push(i);
					}
				}
				return processItemsIndexes;
			}
		}
	};
});

Here I marked tickets in the New status in bold text:

So you can use the same approach in your task.

Hello Serhiy,

Could you please clarify which step exactly you have problems with? 

Was it possible for you to make the text bold without conditions?

If so then how exactly do you add the specific field value? 

Anhelina writes:

Hello Serhiy,

Could you please clarify which step exactly you have problems with? 

Was it possible for you to make the text bold without conditions?

If so then how exactly do you add the specific field value? 

Thank you for your interest. I have overridden 2 methods: 

initQueryColumns: function(esq) {
	this.callParent(arguments);
 
	esq.addColumn("ModifiedBy.Type.Id", "ModifierType");
 
},
 
prepareResponseCollection: function(collection) {
	this.callParent(arguments);
	// Аor each record returned in the query for the list 		
	// check the Amount field value and then apply style
	collection.each(function(item) {
		if (item.get("ModifierType") == "00783ef6-f36b-1410-a883-16d83cab0980") {
			item.customStyle = Ext.apply(item.customStyle || {}, {
				"background-color": "#FFFFCC",
				"font-weight": "bold"
	        });
		}
	}, this);
}

I understand that I need to change this part of the code:

item.customStyle = Ext.apply(item.customStyle || {}, {
	"background-color": "#FFFFCC",
	"font-weight": "bold"
}

It must be something like this:

.title {
	"background-color": "#FFFFCC",
	"font-weight": "bold"
}

But I have no idea how to apply the style to a specific entry element in the list.

 

Сергій Сермакшев,

 

Hello,

 

Try another approach:

define("CaseSection", [], function() {
	return {
		entitySchemaName: "Case",
		messages: {},
		attributes: {},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			onGridDataLoaded: function(response) {
				this.callParent(arguments);
				this.performStylesChange();
			},
 
			performStylesChange: function() {
				var recordTitles = document.getElementsByClassName("grid-primary-column");
				for (var i = 0; i &lt; recordTitles.length; i++) {
					var element = recordTitles[i];
					element.style.fontWeight = 'bold';
				}
			}
		}
	};
});

The logic here is simple: once grid data is loaded we go through all elements on the page and change the style for the text to bold to all title columns (which is a case number). This is not the best solution, but it works properly when the list is loaded or sorting\filtering is changed in the list.

Oleg Drobina writes:

i <

Thank you. For some reason, it complained about "i &lt;" had to delete. Everything worked. 

But how to implement this part of the logic?

if (item.get("ModifierType") == "00783ef6-f36b-1410-a883-16d83cab0980")


It is necessary to highlight only those records where some field matches a specific record in the directory.

Сергій Сермакшев,

Hello. Here is an example. It uses jQuery, but you may easily adapt it to Oleg's example. Main idea is that items[i] is viewModel coresponding to recordTitles[i] DOM element from Oleg's example. 

applyCustomCss: function(){
	var gridData = this.getGridData();
	var items = gridData.getItems();
	var uiItems = $("div[column-name='ColorByProductType']");
 
 
	for (var i = 0; i &lt; items.length; i++){
		var height = $(uiItems[0]).css("height");
		var bgColor;
		var category = items[i].get("Product.SxGoodsCategory").value;
		if (category === SxProductConstants.GoodsCategory.Wine){
			var wineColor = items[i].get("Product.SxColor").value;
			if (wineColor === SxProductConstants.WineColor.Red){
				bgColor = "#cc0a0a";
			}
			else if (wineColor === SxProductConstants.WineColor.White){
				bgColor = "gold";
			}
			else if (wineColor === SxProductConstants.WineColor.Pink){
				bgColor = "pink";
			}
		}
		else if (category === SxProductConstants.GoodsCategory.Champagne){
			bgColor = "bisque";
		}
		else if (category === SxProductConstants.GoodsCategory.StrongAlcoholDrink){
			bgColor = "saddlebrown";
		}
		else if (category === SxProductConstants.GoodsCategory.Water){
			bgColor = "blue";
		}
		$(uiItems[i]).css(
			{"background-color": bgColor, 
			"border-radius": "50%",
			"vertical-align:": "middle",
			"margin-top": "7px",
			"margin-right": "2px",
			"width": height});
	}
},

 

And instead of oveeriding initQueryColumns method it is better to override getGridDataColumns

                getGridDataColumns: function () {
                   var baseGridDataColumns = this.callParent(arguments);
                   var gridDataColumns = {
                       "ModifiedBy.Type.Id": {path: "ModifiedBy.Type.Id"}
                   };
                   return Ext.apply(baseGridDataColumns, gridDataColumns);
               },

 

Сергій Сермакшев,

 

&lt is the html code for < symbol, it's a "feature" of the code editor here in the Community:)

 

As for ModifierType

We have access to items that will be displayed in the grid and their position will be the same as in the response.collection.collection.items. You can pass response to the performStylesChange method and process it there as well and perform the check for the needed ModifierType and change styles only for those records.

 

Something like:

define("CaseSection", [], function() {
	return {
		entitySchemaName: "Case",
		messages: {},
		attributes: {},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			onGridDataLoaded: function(response) {
				this.callParent(arguments);
				this.performStylesChange(response);
			},
 
			performStylesChange: function(response) {
				var processedItemsIndexes = this.checkResponseCollection(response);
				var recordTitles = document.getElementsByClassName("grid-primary-column");
				for (var i = 0; i &lt; recordTitles.length; i++) {
					for (var j = 0; j &lt; processedItemsIndexes.length; j++) {
						if (processedItemsIndexes[j] == i) {
							var element = recordTitles[i];
							element.style.fontWeight = 'bold';
						}
					}
				}
			},
 
			checkResponseCollection: function(response) {
				var responseItems = response.collection.getItems();
				var processItemsIndexes = [];
				for (var i = 0; i &lt; responseItems.length; i++) {
					if (responseItems[i].values.Status.displayValue == "New") {
						processItemsIndexes.push(i);
					}
				}
				return processItemsIndexes;
			}
		}
	};
});

Here I marked tickets in the New status in bold text:

So you can use the same approach in your task.

Oleg Drobina,

Thank you very much. With your help to solve this problem. It also gave me some insight into working with section entries via JavaScript.
Also, if you don't mind, tell me how to compare the "Contact Type" lookup value in the : "ModifiedBy" field. Something like  "ModifiedBy.Type.Id". Thank you again.

Сергій Сермакшев,

 

You are welcome!

 

As for ModifiedBy.Type - the easiest way is to display this column in the section list.

 

Alternatively you can add the initQueryColumns method override to the section methods in the following manner:

initQueryColumns: function(esq) {
				this.callParent(arguments);
				esq.addColumn("Owner.Type", "OwnerType");
			},

What I did here is add the Owner.Type column in the Cases section esq (Case has an Assignee (which is the Owner column that references the Contact entity) and I need to check the contact type specified in this column). As a result

we have access to this OwnerType in the context of the onGridDataLoaded and performStylesChange execution. We can also use it for style recalculation. In your case it should be similar but using another column. 

Oleg Drobina,

You are great. Everything worked out.

Show all comments

I'm struggling to find the best way to make Creatio Support more tech-friendly like our previous provider. 

 

Our Consultant has done an amazing job, but I am pretty handy and can do a lot on my own. Just looking for inspiration! 

 

Happy to share what we've done thus far as well! 

Like 1

Like

0 comments
Show all comments