Hello Creatio Community,

I’m working on the Calls section in Freedom UI and need to filter the Contact lookup by the related ContactCareer -> Account link. On the FormPage, I have the following handler which works correctly:

{
  request: "crt.LoadDataRequest",
  handler: function(request, next) {
      if (request.dataSourceName !== "PDS_Contact_yzb6a3h_List_DS") {
          return next.handle(request);
      }
      var account = request.$context.attributes["PDS_Account_9l7yfn9"];
      if (account) {
          var filter = {
              filterType: 6,
              isEnabled: true,
              items: {
                  CustomFilter: {
                      filterType: 1,
                      isEnabled: true,
                      comparisonType: 3, // Equal
                      leftExpression: {
                          expressionType: 0, // SchemaColumn
                          columnPath: "[ContactCareer:Contact].Account"
                      },
                      rightExpression: {
                          expressionType: 2, // Parameter
                          parameter: {
                              dataValueType: 0, // GUID
                              value: account.value
                          }
                      }
                  }
              }
          };
          request.parameters.push({
              type: "filter",
              value: filter
          });
      }
      return next.handle(request);
  }
}

Now I need to apply exactly this filtering logic to a DataTable on the ListPage (editable grid), but I can’t get it to work.

Has anyone successfully implemented a similar filter for a Freedom UI ListPage DataTable?

Could you please share a code example or best practice?

Thank you in advance for any guidance or samples!

Like 0

Like

2 comments

Hi Віталій Поліщук ,

As far as I know, it's currently not possible to filter lookups using custom code on a Freedom UI list page .

Hello,
I think this question is similar that the one in the post
https://community.creatio.com/questions/how-filter-lookup-values-editable-list-freedom-ui. Please check the provided answer there.

Show all comments

Hi!

I’m working on a Freedom UI Activities page where I display a registry of certificates as an editable list. One of the columns in this list is an Activity lookup, and I need to restrict that lookup to show only the current Activity (i.e. the one tied to the page).

So far, I’ve tried:

Implementing handlers for crt.OpenSelectionWindowRequest and crt.LoadDataRequest to log requests, but these only fire for fields outside the editable list.

Inspecting the Network tab: when I open the lookup dropdown, I see a SelectQuery against rootSchemaName":"Activity" with a filter, but I can’t find where to inject my custom filter for the editable list.

Question:
Does anyone have an example or best practice for applying a filter to a lookup column inside an editable list on a Freedom UI page? Specifically, I need the Activity lookup to return only the activity record corresponding to the parent page when the user clicks the field.

Thank you in advance for your help!

Like 0

Like

2 comments

Iryna Oriyenko,

Hi Iryna,

Thank you for gathering these links for me. I reviewed each of them and successfully implemented the lookup filter on a Freedom UI Form Page. My challenge now is applying the same filter to a Freedom UI List Page (the editable grid inside a section).

I’ve seen mixed information in the community: some comments say inline filtering in the List Page grid isn’t supported yet, while others suggest it might be possible - but I haven’t come across a working example.

Could you confirm whether dynamic lookup filtering in a edit List Page grid is currently supported? If it is, a short code snippet or reference would be greatly appreciated.

Thanks again for your assistance.

Show all comments

Hi Creatio Community,

I’m working on a Freedom UI page in Creatio (v8.2.x) and trying to implement the following scenario:

  • I have a detail (DataGrid) with a list of certificates on the Activity page.
  • I’ve also added a custom button to the page.
  • When the user selects several records from the detail and clicks the button, I want to:
    • Get the selected records (certificate IDs),
    • Get the ID of the current activity (parent page),
    • Pass both as input parameters to a business process (to link the selected certificates to the activity).

Using no-code tools alone, I was only able to pass either the collection or the current page ID, but not both at the same time.

Has anyone implemented a similar case?
Would appreciate any working example or best practices for this scenario.

Thanks in advance!

Like 0

Like

4 comments
Best reply

Віталій Поліщук,

I see. I would assume it's possible to do via code, but I've not looked at how to pass a collection. I'd start with seeing what the request looks like for adding multiple rows to the process from the page designer, then see if you can duplicate that via code, getting the selected rows using: 

const selectedIds = (await request.$context.DataTable_SelectionState).selected;

(Change "DataTable" to your list name)

If you pass the collection from the list, you have the parent ID already since it would have to exist in the list data. You should be able to get the parent ID by just reading the child data. 
Ryan 

Ryan Farley,

Hi Ryan, thank you for your reply!

You're right that if the certificates already had a reference to the activity, I could extract the parent ID from the collection itself.

However, in my case, the selected certificates do not yet have any relationship with the activity. The grid simply displays certificates (filtered by Account), but there’s no link between each certificate and the current activity record.

What I’m trying to do is:

  • Let the user select multiple certificates from this grid,
  • Then click a button to run a business process that will create the relationship between these certificates and the current activity,
  • Which means I need to pass both:
    1. The selected certificate IDs,
    2. And the ID of the current activity page (which isn’t available in the certificate records).

So unfortunately, I can’t infer the parent ID from the child records — I need to explicitly pass both.

If you've come across a similar case in Freedom UI (v8.2+) and have any suggestions on how to pass both parameters to the process, I’d really appreciate it!

Thanks again

Віталій Поліщук,

I see. I would assume it's possible to do via code, but I've not looked at how to pass a collection. I'd start with seeing what the request looks like for adding multiple rows to the process from the page designer, then see if you can duplicate that via code, getting the selected rows using: 

const selectedIds = (await request.$context.DataTable_SelectionState).selected;

(Change "DataTable" to your list name)

Ryan Farley writes:

Віталій Поліщук,

I see. I would assume it's possible to do via code, but I've not looked at how to pass a collection. I'd start with seeing what the request looks like for adding multiple rows to the process from the page designer, then see if you can duplicate that via code, getting the selected rows using: 

const selectedIds = (await request.$context.DataTable_SelectionState).selected;

(Change "DataTable" to your list name)

Hi Ryan,
Thank you so much for your suggestion - that actually helped me better understand how the parent ID can be retrieved from the detail's data context. I'll explore this direction further and adjust my process accordingly. Really appreciate you taking the time to respond!

Show all comments

I found out recently that there is a new parameter type than can be selected which is called "Create from element":

 

I already  checked the official documentation and the new 8.2 release notes but I can't seem to find any information about this. Does anybody know what is the purpose of it?

 

Regards.

Like 1

Like

4 comments

Good catch, did not find documentation either.

This allows you to automatically create parameters in the process that match another process element. It’s especially useful for things like  webservices or subprocesses. If you select that parameter type, it will allow you to choose the other element in the process and then it will create parameters that match that process element. If you selected a web service element, for example, it would create parameters for all of the response parameters exposed by the web service (so if the web service returned Property1, Property2 and a Collection of values, you'd end up with parameters for each of those, mapped to the web service already.  Definitely a time saver. 
Ryan

Thank you very much for your quick response! What other use cases could be good for this new parameter?

 

Regards

Alejandro González Momblán,

That's really it - it's not even actually a parameter in itself - It's more of a parameter generator. The point is to have it generate the needed parameters to work with some other process element, saving you the need/time to create them all yourself. 

Ryan

Show all comments

Good day to everyone! I’ve encountered a task where I need to update the NextSteps component. I used crt.LoadData and crt.ChangeNextStepsStateRequest, but they didn't produce the desired results.

After executing, the component does not update, and data is not displayed; only after a full page refresh does the Next Step appear.

Has anyone encountered a similar issue and could help with a solution? Thanks in advance!
 

{
				request: "crt.HandleViewModelInitRequest",
				handler: async function(request, next) {
					this.applyMethods(request.$context);
					Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE, (await request.$context.ServerMessageReceivedFunc), request.$context);
					await next.handle(request);					
				},
				applyMethods: function(context) {
					let methods = {
						refreshNextStepsStates: async function(date) {
							console.debug(date);
							const handlerChain = sdk.HandlerChainService.instance;
							await handlerChain.process({
								type: 'crt.ChangeNextStepsStateRequest',
								$context: context,
							});
						},						
 
						showWarnDialog: async function(message) {
							const actionsConfig = [
								{
									key: "OK",
									config: {
										color: "warn",
										caption: resources.localizableStrings.BnzShowDialogCloseBtn
									}
								}
							];
							const result = await context.executeRequest({
								type: "crt.ShowDialogRequest",
								$context: context,
								dialogConfig: {
									data: {
										message: message,
										actions: actionsConfig
									}
								}
							});
						},
 
						onSubscribeWebSocket: async function(event, message) {
							if (message.Header.Sender === "Banza_ApprovalAction_WebSocketSender") {
								await this.handleShowWarnMessage(message);
							}
						},
 
						handleShowWarnMessage: async function(message) {
							const sysValuesService = new sdk.SysValuesService();
							const sysValues = await sysValuesService.loadSysValues();
							const caseId = context.attributes.Id;
							const currentUserContactId = sysValues.userContact.value;
							const msgObj = JSON.parse(message.Body);
							if (msgObj && sysValues && currentUserContactId === msgObj.currentUserContactId) {
								if (caseId === msgObj?.recordId) {
									if (msgObj.action === "showWarnDialog") {
										await this.showWarnDialog(msgObj.message);
										await this.refreshNextStepsStates(msgObj?.date);
									}
								}
							}
						},
 
 
					context.ServerMessageReceivedFunc = methods.onSubscribeWebSocket.bind(context);
					Ext.apply(context, methods);
				},
}
Like 4

Like

1 comments

Hi,
Normally, the Next Step component should refresh automatically and show a new step, does it now work in your case? If so, how do you add a new task to it?

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

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

Is it possible to change the name of a Freedom UI section?

Like 0

Like

2 comments
Best reply

Hello,



To change the section name, you need to go to Application Hub. Then select the section you want to change.

Go to Navigation and sections and select the required section, for example, Account. And you will see a field where you can change the name.

Hello,



To change the section name, you need to go to Application Hub. Then select the section you want to change.

Go to Navigation and sections and select the required section, for example, Account. And you will see a field where you can change the name.

Malika,

Thank you.

Show all comments

Hi community,

 

I want to merge duplicated records under the section Cases. I have a ton of cases that have common information and in my situation, there is a key field created by me which stores an external identifier of the record, which is different from the default Case autogenerated number field. If I filter cases by the value of that field I find more than one record, which means that there is redundancy that I need to fix.se

 

I can't do a excel file upload trying to overwrite the information as it will fail when it encounters duplicates. I think the only way to approach this is with a business process, but in the available operations there is one called Find and merge duplicates

But it only lets me search for records from the sections Contacts and Accounts, so I can't access Cases as I want.

 

Could you please help me implement this or suggest a possible solution?

 

Thanks in advance for your help.

Like 0

Like

1 comments

Hello!

 

Please check the article below. There you will find detailed instructions regarding your question.

https://academy.creatio.com/docs/user/platform_basics/business_data/dup…

 

Show all comments

I am trying to submit a request for canes and that keeps popping up I need help Urgently please. I just put random versions and product because I don't know that area. But I am on the Canes/Creatio website trying to submit a request and it isn't working.

Like 0

Like

1 comments

Hello, 

 

Please contact support team at support@creatio.com and provide more details of the issue along with an access to the site where it occurs to proceed with the investigation. 

 

Best regards,

Anastasiia

 

Show all comments