It looks like there are some duplication in localization, but it is hard to define the source of error.

2024-04-02 09:47:54,132 [278] ERROR INFRADIM\bpm_db_admin ConfigurationBuild LogErrors - System.ArgumentException: An item with the same key has already been added.

   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

   at Terrasoft.Core.SchemaResourceManager.PrepareLoadedResources(IEnumerable`1 resources, IEnumerable`1 schemaHierarhy, IEnumerable`1 cultures)

   at Terrasoft.Core.SchemaResourceManager.LoadRuntimeResourcesForSchema(Dictionary`2 localResourceSets, IEnumerable`1 schemaHierarchyIds)

   at Terrasoft.Core.SchemaResourceManager.LoadRuntimeResourcesForSchema(Dictionary`2 localResourceSets)

   at Terrasoft.Core.SchemaResourceManager.InternalGetResourceSet(CultureInfo cultureInfo, Boolean createIfNotExists, Boolean tryParents)

   at Terrasoft.Core.SchemaResourceManager.GetString(String name, CultureInfo culture)

   at Terrasoft.Common.LocalizableValue`1.GetCultureValue(CultureInfo culture, Boolean throwIfNoManager, Boolean useCultureFallback)

   at Terrasoft.Common.LocalizableValue`1.LoadCultureValues(IEnumerable`1 culturesInfo)

   at Terrasoft.Core.Schema.LoadLocalizableValues(IEnumerable`1 culturesInfo)

   at Terrasoft.Core.ClientUnitSchema.LoadLocalizableValues(IEnumerable`1 culturesInfo)

   at Terrasoft.Core.ClientUnitSchema.LoadLocalizableValues()

   at Terrasoft.Core.ClientUnitSchema.InitializePrimaryInfo()

   at Terrasoft.Core.SchemaManager`1.get_DefSchema()

   at Terrasoft.Core.SchemaManager`1.InternalCreateSchema(String name, TSchemaManagerSchema baseSchema, UserConnection userConnection, Guid uid, Boolean fromMetaData)

   at Terrasoft.Core.SchemaManager`1.InternalCreateSchema(String name, ISchemaManagerItem baseSchema, UserConnection userConnection, Boolean fromMetaData)

   at Terrasoft.Core.MetaDataSerializer.d__7.MoveNext()

   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)

   at Terrasoft.Core.SchemaManager`1.DeserializeSchemaManagerItem(Stream metaData, UserConnection userConnection)

   at Terrasoft.Core.SchemaManager`1.DeriveSchemaManagerItem(UserConnection userConnection, EntityCollection orderedSchemas)

   at Terrasoft.Core.SchemaManager`1.CreateRuntimeSchemaFromMetaData(Guid schemaUId, UserConnection userConnection)

   at Terrasoft.Core.ClientUnitSchemaManager.FindInstanceByName(String name)

   at Terrasoft.Core.ClientUnitSchemaManager.GetInstanceByName(String name)

   at Terrasoft.Core.ClientContentGeneration.ConfigurationClientContentFileGenerator.GetClientUnitSchema(ClientUnitSchemaManager manager, String schemaName)

   at Terrasoft.Core.ClientContentGeneration.ConfigurationClientContentFileGenerator.d__27.MoveNext()

Like 0

Like

1 comments

Hello,

 

Thank you for your question. According to the error code, you can see that the error occurs when preparing loaded resources (PrepareLoadedResources).

However, this error can occur in many different cases. Most likely, there are duplicate values in the DB tables.



The best solution would be to open a ticket with the Creatio support team so that we can analyze the issue in detail based on reproducing the error and analyzing the application logs.

 

Thank you.

Show all comments

We use Creatio 7.18.

I am trying to setup a FastReport as part of which I am trying to populate a table with Reportees of the current user.

I used below to get current user id, but it returns “Supervisor” user (reference - https://community.creatio.com/questions/terrasoftsysvaluecurrentuservalue-equivalent-c).

Can anyone help with the correct way to get Current user Id in Source Code for Data Provider class to setup FastReport?

 

var appConnection = HttpContext.Current.Application["AppConnection"] as AppConnection;

var currentUser = appConnection.SystemUserConnection.CurrentUser;

var userId = currentUser.Id;

Like 0

Like

2 comments

App connection always returns "Supervisor" since this user is a system operations user. If you need to get the current user who manually triggered report generation and the custom code you need to use the same approach but with using UserConnection instead of appConnection (as Ryan described in his first example):

var currentUser = UserConnection.CurrentUser;
var userId = currentUser.Id;
var userName = currentUser.Name;

Or maybe I didn't understand the required result:)

Oleg Drobina,

My bad! I misunderstood his statement. Since I was trying it out in a source code schema and not a script task, I only tried using the 2nd method. The 1st method correctly returns the required information. Thanks for pointing that out, Oleg!

Show all comments

Hi all,



I've added a button to the left container of the orders page labelled 'Update quote costs'. The button is visible on the condition that the boolean 'Recalculation required' (a field on the order) is true. I've added the diff and the method to the section schema and the section page.

(edit - added gif of button)

 

When I open the page from the section for a record where 'Recalculation required' is true, the button does not appear. If I refresh the page, the button then does.

 

I believe this is because the header loads before the data so when it first loads, it can't read the 'Recalculation required' field.



Is there a solution to this? If not, I can move the button to the header container as the conditions do work this way. It just doesn't look as good.



Nb. using Freedom shell on classic pages

Like 0

Like

1 comments

Hello,

The problem is not in the container, when you open a page from a section, the system still thinks that you see a section page. Therefore, the condition for your button isn't applied.

In order to fix it, you need to create your button in a combined mode, for example.

Take a look at the button and its condition is defined in a SectionV2 page as well as PageV2.

Show all comments

 

Hi all, 



Just wondering whether is there any way that we can run some javascript code / callback function upon completion of business process execution in client module?

 

If so, could you provide the sample code for reference?

 

Thank you very much.

Like 0

Like

2 comments

Hello,

 

If this is needed for versions lower than 8.0.6 (version when the LiveEditing feature was added out-of-the-box that will reload entity automatically in case changes to it were applied by a process) - you can always send a socket message to the client-side logic (like in the example but the message sending mechanism should be in the last script-task of the business process, on the client-side create a method that is triggered upon receiving the message)  or use an already-developed marketplace addon for it.

To elaborate more on what Oleg mentioned. There's no way to have a callback for when the process completes (the callback commented in your code is a callback for the completion of *starting* the process). A process can have things that wait for a period of time, so not really possible to wait for completion.

The approach to take is for the process to notify the client-code that it has completed by sending it a message. This article shows how to send the message: 

https://customerfx.com/article/how-to-refresh-a-page-from-a-process-in-…

If needed, this article shows how to receive the message in a Freedom UI page: 

https://customerfx.com/article/receiving-server-side-messages-in-a-crea…

However, if the page is Freedom UI, a better approach is to enable live data updates for the object so the refresh happens automatically when the data changes in the process. More about that here: 

https://customerfx.com/article/automatically-refreshing-a-creatio-freed…

From the code you posted, it looks like this is a classic page, so you'd have to go the first route for sending a message from the process to the client page.

Ryan

Show all comments

Hello,

 

I have read through on locking fields using client module in Creatio. I have found that we can simply setting the "isModelItemEnabled" to true/false. And for more complex situation, we can create a function named "isModelItemEnabled" and write our code logic and return boolean value conditionally.

 

At the same time, I noticed that "isModelItemEnabled" is triggered before "onEntityInitialized" is triggered. This results to some of the values required to be used in "isModelItemEnabled" undefined.

 

Is there anyway to workaround this?

Like 0

Like

2 comments
Best reply

Rather than create a function, use an attribute. Then in the onEntityInitialized you can read any values and then set the attribute to true/false. See an example here: https://customerfx.com/article/completely-locking-a-page-via-code-inclu…

Also, just to point out, you mention locking a single field. If all you need is to lock a single field, there's no need to use IsModelItemsEnabled. Instead you can bind the visible for the field to an attribute and set as true/false as needed. See https://customerfx.com/article/how-to-enable-or-disable-a-field-on-a-pa…

Ryan

Rather than create a function, use an attribute. Then in the onEntityInitialized you can read any values and then set the attribute to true/false. See an example here: https://customerfx.com/article/completely-locking-a-page-via-code-inclu…

Also, just to point out, you mention locking a single field. If all you need is to lock a single field, there's no need to use IsModelItemsEnabled. Instead you can bind the visible for the field to an attribute and set as true/false as needed. See https://customerfx.com/article/how-to-enable-or-disable-a-field-on-a-pa…

Ryan

Okay, I will try it out. Thank you very much Ryan, best as always😄

Show all comments

I have added a button on every record in detail for a particular column. I am trying to have one more button on the same detail, But the button is not visible on the UI.

The code that i used for this is:

{
"operation": "merge",
"name": "DataGrid",
"parentName": "DataGridContainer",
"propertyName": "items",
"values": {
"className": "Terrasoft.ControlGrid",
"controlColumnName": "UsrPlanningManagerRelevance",
"applyControlConfig": {"bindTo": "applyControlConfig"}
}
},

METHOD

applyControlConfig: function(control, activeRow) {
control.config = {
"className": "Terrasoft.Button",
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"caption": "מסמכי רקע",//this.get("Resources.Strings.FileButtonCaption"),
"imageConfig": {"bindTo": "Resources.Images.ExportToExcelBtnImage"},
"handler": this.BackgroundDocumentsClick.bind(this, activeRow.id)
};

Can anyone help me on this?

Like 1

Like

1 comments
Best reply

Hi,



I think, you can do this by appending buttons in the targeted column.

 

var baseEle = "#Identifier div[id*=\"item-" + rowId + "\"]  div:nth-last-child(2)";
$(baseEle).append(Ext.String.format("<span></span>"));
 
var ele = baseSelector + ">span";
$(ele).click(function() {});

 

Loop collection in prepareResponseCollection method or onGridDataLoaded

Hi,



I think, you can do this by appending buttons in the targeted column.

 

var baseEle = "#Identifier div[id*=\"item-" + rowId + "\"]  div:nth-last-child(2)";
$(baseEle).append(Ext.String.format("<span></span>"));
 
var ele = baseSelector + ">span";
$(ele).click(function() {});

 

Loop collection in prepareResponseCollection method or onGridDataLoaded

Show all comments

Hi 

I want to add SelectPdf library to Creatio and use it in BP 

however when  I upload using the import in the Configuration section into package

it ask for the Select.Html.dep in the dotnet shared folder 

I added manually but I get error that kernel32.dll is missing, as I know this kernal is window specific dll and not for linux

Is am doing this right or something missing?

Like 0

Like

2 comments

Hello,

 

Can you please point me on where to download the exact dll from here https://selectpdf.com/pdf-library-for-net/ to test its upload to the app?

 

Thank you!

SelectPdf requires a Windows server, it does not work on Linux according to it's docs. From here: https://selectpdf.com/docs/Installation.htm

Currently it requires a Windows system to run. It does not work on Linux or Mac or Xamarin.

Ryan

Show all comments

Hello,

 

Can I get Marketing Creatio training videos in Russian? 

 

Thanks in advance. 

Like 0

Like

1 comments

Hi!

 

We currently do not have Russian video materials ready. Thank you for bringing up the idea!

 

We will take it into consideration.

Show all comments

Hi all,

 

I'm trying to migrate a package from our dev site to production.



We have multiple metric widgets on one of the pages and these are not migrating with the package (only their placeholders in the diff).



Can anybody advise what needs to be bound to the package to ensure these elements migrate across?



Nb. Version is up-to-date but we are not using the Freedom UI.

Like 0

Like

1 comments
Best reply

The metric definition is stored in SysWidgetDashboard. 

 

You’ll need to locate the row and bind the data to your package. The page code will contain the Id for  the record. 

The metric definition is stored in SysWidgetDashboard. 

 

You’ll need to locate the row and bind the data to your package. The page code will contain the Id for  the record. 

Show all comments

after adding ssl the websocket in pending status

 

Like 0

Like

1 comments

Greetings,



We kindly ask you to contact us via email at support@creatio.com for an in-depth analysis of your error.

Show all comments