Hello,

I have implemented a filter for a section using the getFilters  method which works fine on the Section page, but should not apply to the dashboard page. Is there a way to have the filter apply only to the Section grid but still leave the dashboard unfiltered?

Like 0

Like

1 comments

Not sure if this will work, but you could maybe try checking in the getFilters method which view the user is on, and if it's the dashboard view then don't apply the filter? Never tried this so not sure if it's too late at that point (or if it retrieves the data again when switching views or not)

To check if user is viewing dashboard view:

if (this.getActiveViewName() === "AnalyticsDataView") {
    // user is on dashboard view
}

I think you can override changeDataView to force it to reapply the filter (and retrieve data again). Something like this: 

changeDataView: function() {
    this.callParent(arguments);
    if (this.getActiveViewName() === "AnalyticsDataView") {
        this.sandbox.publish("ReloadDashboard", null, [this.sandbox.id + "SectionDashboardDashboardModule"]);
    }
    else {
        this.updateSection();
    }
}

Ryan

Show all comments

Hi all,

 

I have implemented the use of bulk addition to a detail using this Creatio Academy article.



If possible, I would like to filter the bulk addition records to match the business rules of the page i.e. AddressType = 'Site'

				"3361d12a-6dde-417b-b462-d7e171af7edf": {
					"uId": "3361d12a-6dde-417b-b462-d7e171af7edf",
					"enabled": true,
					"removed": false,
					"ruleType": 1,
					"baseAttributePatch": "AddressType",
					"comparisonType": 3,
					"autoClean": false,
					"autocomplete": false,
					"type": 0,
					"value": "7a5d8cdb-54d6-46ce-8b5c-a4a9b319dbb7", //AddressType = 'Site'
					"dataValueType": 10
				}
			}

Is there any way that this can be implemented?

Like 0

Like

3 comments
Best reply

By way of an epilogue and for anyone who happens this way in the future.

 

To filter the lookup add the following method to the detail source code (ref.  Creatio Academy):

//  Filter the lookup entries.
getAdditionalLookupFilters: function() {
	var filterGroup = new this.Terrasoft.createFilterGroup();
	filterGroup.add("ByCaseStatusFilter", this.Terrasoft.createColumnFilterWithParameter(
		this.Terrasoft.ComparisonType.EQUAL, "AddressType", "7a5d8cdb-54d6-46ce-8b5c-a4a9b319dbb7")
	);
	return filterGroup;
}

This overrdes the method in LookupMultiAddMixin.js.

Hello,

 

Business rules cannot be implemented here unfortunately since we need to filter data in the opened modal window to select records. But you can try overriding the logic of the openLookupWithMultiSelect method in your detail schema and add your filters to the config.filters object (you need to debug openLookupWithMultiSelect method execution). For example:

 

1) Register a message in the detail schema with the PUBLISH type.

2) Register an attribute in the detail schema that will store "AddressType" of a main record.

3) In the main page schema register the same message as in step 1, but with the SUBSCRIBE type.

4) Override base subscribeSandboxEvents method in the main record schema and subscribe to the message from step 3. This should be done properly using the construction like:

this.sandbox.subscribe("GetMainContactEmail", this.getMainContactEmail, this,
						[this.getDetailId("UsrSchemabfb885cbDetail7d4ca999")]);

where 

 

getMainContactEmail will be the message handler method (the one method that will be called when the message is received);

UsrSchemabfb885cbDetail7d4ca999 will be the detail Id of the detail where multiple adding was developed (name of the detail from the "details" object in the main record schema).

5) In the message handler method from step 4 write a code to rertrieve current record address type and return it.

6) In the detail schema inside the init method execution send the message from step 1 via sandbox and assign the result of this message sending for some variable (something like):

var result = this.sandbox.publish("GetMainContactEmail", null, [this.sandbox.id]);

7) In the detail schema check if something was returned by the method handler from step 5 for the message sent from step 6. If there is something returned - set the returned value to the attribute from step 2.

8) Override the openLookupWithMultiSelect method and add additional filter using the value from the attribute from step 2 that was written to the attribute at step 7.

 

As a result when you open the modal box to bulk add records to the detail not all the records will be returned, but only those that fit filtering conditions developed in the steps above.

Oleg Drobina,

Excellent. Thanks Oleg!

I'll give this a try and get back to you.

By way of an epilogue and for anyone who happens this way in the future.

 

To filter the lookup add the following method to the detail source code (ref.  Creatio Academy):

//  Filter the lookup entries.
getAdditionalLookupFilters: function() {
	var filterGroup = new this.Terrasoft.createFilterGroup();
	filterGroup.add("ByCaseStatusFilter", this.Terrasoft.createColumnFilterWithParameter(
		this.Terrasoft.ComparisonType.EQUAL, "AddressType", "7a5d8cdb-54d6-46ce-8b5c-a4a9b319dbb7")
	);
	return filterGroup;
}

This overrdes the method in LookupMultiAddMixin.js.

Show all comments

Hi Community,

1- Is there any set of practices to optimize Bussiness Processes ?

Ex- I already know that for 'Read Elements' we should only choose to read the fields we use through the process., and NOT all the fields of the Object.

 

2- Is it a good practice that for processes that are used often and that consume a lot of time, to replace the low code elements 'Add Data' od 'Modify Data' with user tasks ( C#) ?

 

Thank you

Sasori

Like 2

Like

6 comments
Best reply

Hello,

 

There are indeed several practices that can help optimize business processes:

- Minimize unnecessary actions: Similar to your example of reading only the required fields, it's a good practice to minimize unnecessary actions within a process. This includes reducing unnecessary data queries, calculations, or validations that may not contribute to the outcome.

- Use conditional branching wisely: Avoid excessive or complex branching conditions within a process, as it can make the process harder to understand and maintain. Simplify the logic by using conditions that are essential to the process flow.

- Optimize data retrieval: When retrieving data from external systems or databases, consider using filters and conditions to retrieve only the necessary data. This can improve the performance of the process and reduce unnecessary data processing.

- Monitor and measure process performance: Regularly monitor and measure the performance of your business processes. Use the built-in analytics tools to identify bottlenecks, areas for improvement, and opportunities for optimization.

2. It would be nice to create processes with no-code, but Creatio coverts them to C# code

Hi Vladimir, thank you for your answer :)

So using a 'user task' insted of low a low code element doesnt actually improve the performance ?

What is you suggestion in improving the performance of a business process ?

Hi community,

Any up-date regarding this topic ?

Sasori

Hi Creatio community,

Any up-date regarding the topic ?

Sasori

Hello,

 

There are indeed several practices that can help optimize business processes:

- Minimize unnecessary actions: Similar to your example of reading only the required fields, it's a good practice to minimize unnecessary actions within a process. This includes reducing unnecessary data queries, calculations, or validations that may not contribute to the outcome.

- Use conditional branching wisely: Avoid excessive or complex branching conditions within a process, as it can make the process harder to understand and maintain. Simplify the logic by using conditions that are essential to the process flow.

- Optimize data retrieval: When retrieving data from external systems or databases, consider using filters and conditions to retrieve only the necessary data. This can improve the performance of the process and reduce unnecessary data processing.

- Monitor and measure process performance: Regularly monitor and measure the performance of your business processes. Use the built-in analytics tools to identify bottlenecks, areas for improvement, and opportunities for optimization.

It is generally recommended to use low-code elements like "Add Data" or "Modify Data" within processes whenever possible. These elements are designed to work efficiently with the platform's data structures and provide a simplified way to interact with the database.

Replacing low-code elements with custom user tasks using C# should be considered when there are specific requirements or complex business logic that cannot be achieved using the standard functionality. However, using custom user tasks introduces additional complexity, development effort, and maintenance overhead. It's important to carefully evaluate the trade-offs and assess whether the benefits of using custom code outweigh the potential drawbacks.

Show all comments

Hello community,

Is it possible to refresh a dashboard widget in an AccountPageV2 schema, without reloading the whole entity?

Thank you,

Sasori

Like 1

Like

2 comments

HI community,

Any update regarding this question?

Sasori

Hello,

 

We have checked this and unfortunately it is not possible to set this up in the system using basic tools. However, we already registered this idea for our R&D team and such functionality may appear in future releases.

Show all comments

Hi,

I've created a custom FreedomUI page for AccountAddress object. I'd like to implement some kind of automation for two lookup fields: Country and Region. It consists of two parts:

1. When I choose a region from list, the country should be set to region's country. For example, if I choose Texas region, I expect that country will be set to United States

2. When I choose a country, regions lookup should display only these regions, which are connected with selected country.

I haven't any problem with implementation of the first part. But the second part doesn't work I expected. I use handler for crt.LoadDataRequest to append a filter parameter when loading regions list. The problem is that this handler runs only once, at first list load. It doesn't execute when I change country, although I trigger such request from other handler (crt.HandleViewModelAttributeChangeRequest). Here is the crucial of my code:

{
	request: 'crt.LoadDataRequest',
	handler: async (request, next) => {
        if (request.dataSourceName === 'Region_List_DS') {
	        const predefinedFilter = await request.$context.Region_filter;
	        request.parameters.push({
		        type: "filter",
		        value: predefinedFilter
	        });
        }
 
		return await next?.handle(request);
	}
},
{
	request: 'crt.HandleViewModelAttributeChangeRequest',
	handler: async (request, next) => {
        if (request.attributeName === 'EvCountry' && request.value?.value != null && (request.oldValue?.value == null || request.value.value !== request.oldValue.value)) {
			const countryId = request.value?.value;
            request.$context.EvRegion_filter = {
				"items": {
					"1954b2e1-ea91-4014-b785-cda17020595c": {
						"items": {
							"CustomFilters": {
								"items": {
									"customFilterCountry_Region_1664cb4d-2690-48d6-bcdf-0c8075824efa": {
										"filterType": 1,
										"comparisonType": 3,
										"isEnabled": true,
										"trimDateTimeParameterToDate": false,
										"leftExpression": {
											"expressionType": 0,
											"columnPath": "Country"
										},
										"rightExpression": {
											"expressionType": 2,
											"parameter": {
												"dataValueType": 10,
												"value": countryId
											}
										}
									}
								},
								"logicalOperation": 0,
								"isEnabled": true,
								"filterType": 6
							}
						},
						"logicalOperation": 0,
						"isEnabled": true,
						"filterType": 6
					}
				},
				"logicalOperation": 0,
				"isEnabled": true,
				"filterType": 6
			};
 
			const handlerChain = sdk.HandlerChainService.instance;
			const result = await handlerChain.process({
				type: "crt.LoadDataRequest",
				$context: request.$context,
				config: {
					loadType: "load"
				},
				dataSourceName: "EvRegion_List_DS",
			});
		}
 
		return next?.handle(request);
	}
}

The problem is that my trigger (handlerChain.process call) doesn't run crt.LoadDataRequest, and result variable contains full, unfiltered list of regions.

Like 1

Like

5 comments

Hello,

 

Thank you for the code and description!

 

We've verified the issue and discussed it with our core R&D team: in 8.0.9 there will be a possibility to add filtration business rules using wizard capabilities in Freedom UI. Please wait until this version is released and use this rule type to create dynamic filtration in Freedom UI interface.

Oleg Drobina,

as filtration business rules do not cover all cases of filtration, when can we wait for trigger fix?

We have tested in 8.0.9 and have the same issue as described



Thank you!

Vladimir

Vladimir Sokolov,

 

indeed filtration rules (along with static filtering business rules) don't cover all cases, but most of them. As for the list loading and the LoadDataRequest - in 8.1.0 there will be new "filterAttributes" attribute added for each list of each data source with the boolean "loadOnChange" property that will allow dynamic setup of filters in the lists (including combobox). It will look like this:

"filterAttributes": [
					{
						"loadOnChange": true,
						"name": "AccountItems_FILTER_BY_ACTIVE_ROWS"
					}

where AccountItems_FILTER_BY_ACTIVE_ROWS will be the filter itself. So in 8.1.0 all filtration cases should be covered by this functionality.

Hello,

 

Glad to inform you that in 8.1.1 we've added the possibility to use custom filters in page schema handlers when working with SDK. So you can upgrade your apps and you will be able to use custom filtration on the page.

Hi Oleg,

 

Do you have the code / Procedure to do this in 8.1.1 ?

Show all comments

Hi Team,

I have created a simple Dasboard Widget on AccountPageV2 (printscreen from Section Wizard) on Environement 1.

However when i deploy the package, the created dashboard widget doesnt appear in the Environment 2.

I open the section wizard from Environment 2  and the dashboard looks like this:

 

 

Form Console I get:

How can I fix this ?

Sasori

Like 0

Like

2 comments

Hi community!

Any update on this issue ?

Sasori

Hello Sasori,



When dashboards are added to an edit page, the corresponding records are created in SysWidgetDashboard and SysWidgetDashboardLcz tables.



If a dashboard is added not to an edit page but to the "Dashboards" tab, then records will be added in the SysDashboard and SysDashboardLcz tables, respectively.

.

Also, there is also a corresponding binding of these data to the package which was set as a current package when the dashboards were created.



The thing is that dashboards are localizable system objects. When a dashboard is created, records are created in two tables:

- a record about a dashboard created in the localization, which corresponds to the base culture of the system, is created in the [SysWidgetDashboard]/[SysDashboard] table;

-records about dashboards of all other localizations are created in the [SysWidgetDashboardLcz]/[SysDashboardLcz] table and are linked to a record in the [SysWidgetDashboard]/[SysDashboard] table by the [RecordId] column.



So basically, all you need to do is to prepare a package which will contain all the needed data bindings and SQL scenarios which will perform the records' entry to the tables mentioned above.



More information on data binding is on our academy.

Also, knowledge of SQL might be needed in order to find the needed dashboard in the database, although you can always create a lookup and search via UI. 

Show all comments

Anyone had an opportunity to work with validator on dataSource field in freedomUI? I've tried add "validators" tag to viewModelConfig on DataSource, but had an error that validator was not registred. Can someone suggest something?

Like 0

Like

4 comments

Hello,

 

Could you please share what steps you took and what was the result?

Igor Zemlyar,

 

Please double-check using example in the Academy article here, validators are operational and should be properly. Maybe this is a specific behaviour of this particular field and some other logic prevents validator from working.

Oleg Drobina,

Yes, i've had this article for example, validators are working on page but not on dataSource' fields. I had even tried copy this example from article with the same signatures but using it for dataSource fields and i had troubles

Igor Zemlyar,

Could you provide some examples of a validator implementation that didn't work for a field?

Show all comments

Hi Community,

I copy the business process 'Create Opportunity from Lead v7.8.0' part of the OOB package 'OpportunityManagement' to my current package because i have to add an extra logic into it.

Question:

After copying the business process to our custom pacakge, should i deactivate the OOB process, and just keep the modified one in my custom package ?

All the best 

Sasori

Like 0

Like

3 comments
Best reply

Hello,

 

After copying and making modifications to the 'Create Opportunity from Lead v7.8.0' out-of-the-box (OOB) business process, it is advisable to deactivate it. Deactivating the OOB process ensures that only your customized version in the custom package is active and utilized in your system.

By deactivating the OOB process, you prevent conflicts and confusion that may arise from having multiple active processes with the same functionality. 

Hi, any update regarding the issue ?

Hello,

 

After copying and making modifications to the 'Create Opportunity from Lead v7.8.0' out-of-the-box (OOB) business process, it is advisable to deactivate it. Deactivating the OOB process ensures that only your customized version in the custom package is active and utilized in your system.

By deactivating the OOB process, you prevent conflicts and confusion that may arise from having multiple active processes with the same functionality. 

Thanks for the recommendation Anastasia

Show all comments

Hi all,

There have been loads of messages on this matter but not seen any correct answer for the process logs cleanup.

I am running onsite with the 7.18.5 on Windows.

I have a retention of 30 days in the settings but process logs from 1st of April to the 15th are still there. I have now in production a big chain of processes and those are generating a lot of subprocess calls. I am facing a slow down in the process logs browsing and opening a single process logs takes long time.

 

The amount of process logs is now over 1.5 million records...

 

How can have a correct cleanup of the process logs ? Why the cleanup is not working correctly ?  

Like 0

Like

1 comments

Hi Franck,



We recommend using a basic automatic mechanism in order to reduce the size of the tables. 



Creatio automatically archives completed and canceled processes that remain in the [ Process log ] section list for more than a set period. The default archiving period is 30 days.



As for the system settings. If you want the process logs to be deleted from the system within 30 days, you need the sum of values of the syssettings  ProcessLogArchivingPeriod and ArchiveDataExpirationTerm to be equal to 30 days. It's also worth mentioning that if you set a value of the setting to 0 it will be disabled and the records won't be archived at all. 

Let's say you set  ProcessLogArchivingPeriod to be 15 days, and  ArchiveDataExpirationTerm to 15 days as well. 

Then, let's say the process is being completed on 01.01.2022, then on 16.01.2022 the process log record will be archived and on 01.02.2022 it will be deleted. 



Please find more information here.

 

Show all comments

Like 0

Like

2 comments

In your web config add this to the system.web section    <trust level="Full" />

 

 

<system.web>

   <trust level="Full" />

</system.web>

Hello,

 

The mentioned error indicates that the application cannot access the DB. 

Please double-check the access parameters specified in ConnectionStrings.config file. 



Best regards,

Anastasiia

Show all comments