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,

 

I have a few checkbox fields on the Order page and would like to update the Order stage in the DCM based on the field values. Can anyone tell me what will be the best way to go about it?

Like 0

Like

4 comments

Hello Nirupama ,

You can use Business process to update the DCM .When the checkbox fields are modified have a trigger in Business process and modify the DCM stage using modify element

Pavan Manne,

Thanks, Pavan! That should work. I was just wondering if there is a way to do it from client side without creating a business process. Setting the Stage value through client code did not seem to work. Do you know if there is a way to update the DCM stage using client side code?

Thanks, Pavan! 

Show all comments

In Activity we wanted to filter owner field . currently all users are showing in the list but we need only to show active users ?

I try to add an attribute in the ActivityPageV2 but it does not work unlike in the contact section

        attributes: {

            "Owner": {

                // Attribute data type.

                "dataValueType": Terrasoft.DataValueType.LOOKUP,

                "lookupListConfig": {

                    "filters": [

                        function() {

                            var filterGroup = Ext.create("Terrasoft.FilterGroup");

                            filterGroup.add("IsUser",Terrasoft.createColumnIsNotNullFilter("[SysAdminUnit:Contact].Id"));

                            

                            filterGroup.add("IsActive",

                                            Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"[SysAdminUnit:Contact].Active",true));

                            return filterGroup;

                        }

                    ]

                }

            },

        },

Like 0

Like

2 comments

Hi,

Your code doesn't work on the Activity page because it has additional logic to owner filters.

In order to make it work you need to override method _applyLookupListConfigToOwnerColumn in the ActivityPageV2 and make it empty:

            _applyLookupListConfigToOwnerColumn: function() {

                return false;

            }

Thank you

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

Hi Community,

 

Is it feasible to replicate the functionality of Forecast section for a custom object and add its corresponding fields?

 

Any idea on replicating the functionality or any other way for achieving the same would be helpful.

 

Thanks,

Sivaranjani

Like 1

Like

2 comments

Hello, 

 

Unfortunately, we do not have that option. 

But we have registered it with our R&D team for review and implementation in future releases of the application.



Thank you for your help in improving our product.





Best regards,

Orkhan Gojaev

Very interesting idea indeed :)

Show all comments

Hi Creatio community,

 

I'm trying to set default folder filter for product selection page in order product detail. Whenever the user login, a default folder should be selected and those products should be visible.

 

I'm able to achieve this task in Product section page where I'm updating the 'SysProfileData' object based on the key (ProductSectionV2GridDataViewFilters) .

 

But in the  Product Catalogue page shown below, SysProfileData object is not updating while switching from one folder to other also there is no Key for it to update.

 

 

 

Any idea on how to set default folder filter for the Product selection page would be appreciated.



 

Thanks,

Sivaranjani

Like 0

Like

2 comments

Greetings,



Unfortunately, we are unable to see the pictures you have attached.

Could you kindly re-post them in the comment section? 

Mykhailo Zeleniuk,

Please find the images below.



In "Product Catalogue" the folder filter is not working.



Product section default folder filter is working.





How to set a folder filter default in Product Catalogue (Order section - Product detail).



BR,

Bhoobalan Palanivelu.

Show all comments

Having figured out how to do this I thought I would post the solution.

Sometimes the name of an uploaded file does not indicate what the contents are, the description is needed.  Out of the box this description is not displayed on an attachment timeline tile.  The steps to add the description follow.

The Creatio page on configuring the timeline is Timeline.  The scheme of things is roughly table 'TimelinePageSetting' configures the timeline for a section, while table 'TimelineTileSetting' is for configuring individual tiles.

Create two modules (Advanced settings > +Add), which I will call "UsrFileTimelineItemViewWithDescription" and "UsrFileTimelineItemViewModelWithDescription".

Add the following to "UsrFileTimelineItemViewWithDescription":

define("UsrFileTimelineItemViewModelWithDescription", ["UsrFileTimelineItemViewModelWithDescriptionResources", "FileTimelineItemViewModel"
      ],
      function() {
            Ext.define("Terrasoft.configuration.UsrFileTimelineItemViewModelWithDescription", {
                  alternateClassName: "Terrasoft.UsrFileTimelineItemViewModelWithDescription",
                  extend: "Terrasoft.FileTimelineItemViewModel",
            });
      }
);

Within this schema add a localizable string with the code "NotesLabel" ('Notes' being the name of the column within the table that holds attachments, the table name being the section name suffixed with "File", e.g., "OpprtunityFile") . Set the value to "Description", it will be the label of the field in the timeline.

Add the following to "UsrFileTimelineItemViewModelWithDescription":

define("UsrFileTimelineItemViewWithDescription", ["FileTimelineItemView"], function() {
      Ext.define("Terrasoft.configuration.UsrFileTimelineItemViewWithDescription", {
            extend: "Terrasoft.FileTimelineItemView",
            alternateClassName: "Terrasoft.UsrFileTimelineItemViewWithDescription",
            getBodyViewConfig: function() {
                  var bodyConfig = {
                        "name": "BodyContainer",
                        "itemType": Terrasoft.ViewItemType.CONTAINER,
                        "classes": {
                              "wrapClassName": ["timeline-item-body-container"]
                        },
                        "items": [
                              this.getTextWithLabelContainerViewConfig("Resources.Strings.NotesLabel", "Notes")
                        ]
                  };
                  var imagePreviewConfig = this.callParent(arguments);
                  bodyConfig.items.unshift(imagePreviewConfig);
                  return bodyConfig;
            }
      });
});

Execute the following SQL to obtain the current 'TimelineTileSetting' table 'Data' entry for attachments:

SELECT encode("Data", 'escape')
AS text_column
FROM "TimelineTileSetting"
WHERE "Name" = 'Files'

I used JSON Formatter to format the JSON output.

Change "viewClassName" and "viewModelClassName" to reflect the modules created earlier.

Add the following 'columns' configuration:

"columns":[{"columnName":"Notes","columnAlias": "Notes"}]

The JSON should now look along the lines of:

{
    "typeColumnValue":"529bc2f8-0ee0-df11-971b-001d60e938c6",
    "entitySchemaName":"##ReferenceSchemaName##File",
    "viewModelClassName":"Terrasoft.UsrFileTimelineItemViewModelWithDescription",
    "viewClassName":"Terrasoft.UsrFileTimelineItemViewWithDescription",
    "orderColumnName":"CreatedOn",
    "authorColumnName":"CreatedBy",
    "captionColumnName":"Name",
    "columns":[
        {
            "columnName":"Notes",
            "columnAlias":"Notes"
        }
    ]
}

I used Minify JSON to re-minify the JSON.

Update 'TimelineTileSetting' with the following query:

UPDATE "TimelineTileSetting"
SET "Data" = '{"typeColumnValue":"529bc2f8-0ee0-df11-971b-001d60e938c6","entitySchemaName":"##ReferenceSchemaName##File","viewModelClassName":"Terrasoft.UsrFileTimelineItemViewModelWithDescription","viewClassName":"Terrasoft.UsrFileTimelineItemViewWithDescription","orderColumnName":"CreatedOn","authorColumnName":"CreatedBy","captionColumnName":"Name","columns":[{"columnName":"Notes","columnAlias": "Notes"}]}'
WHERE "Name" = 'Files'

Refresh the browser cache, if necessary generating the source code for all schemas and compiling the app.

Like 1

Like

2 comments

A quick correction, the final UPDATE query 'Data' column is binary data, so the query should be:

UPDATE "TimelineTileSetting"
SET "Data" = decode('{"typeColumnValue":"529bc2f8-0ee0-df11-971b-001d60e938c6","entitySchemaName":"##ReferenceSchemaName##File","viewModelClassName":"Terrasoft.UsrFileTimelineItemViewModelWithDescription","viewClassName":"Terrasoft.UsrFileTimelineItemViewWithDescription","orderColumnName":"CreatedOn","authorColumnName":"CreatedBy","captionColumnName":"Name","columns":[{"columnName":"Notes","columnAlias": "Notes"}]}', 'escape')
WHERE "Name" = 'Files'

 

Nice! Thanks for sharing.

Ryan

Show all comments

I need to add the attachment 'Description' (the 'Notes' field of the attachment file 'OpportunityFile') to the Timeline tile for an attachment (Opportunities section).  I'm probably missing a step out, but if somebody can clarify this for me it would be much appreciated:

 

1) The Data for key 'OpportunityPageV2' of 'TimelinePageSetting':

select
"Key",
encode("Data",'escape') as "Data"
from "TimelinePageSetting"
    {
        "entityConfigKey":"59de07a7-28dd-4dc9-a106-a07cb9981423",
        "entitySchemaName":"OpportunityFile",
        "typeColumnName":"Type",
        "typeColumnValue":"529bc2f8-0ee0-df11-971b-001d60e938c6",
        "referenceColumnName":"Opportunity",
        "masterRecordColumnName":"Id"
    },

2) The edited entry for Id '59de07a7-28dd-4dc9-a106-a07cb9981423' of 'TimelineTileSetting':

select
"Id", 
"Name", 
encode("Data", 'escape') as "Data"
from "TimelineTileSetting"
{
    "typeColumnValue":"529bc2f8-0ee0-df11-971b-001d60e938c6",
    "entitySchemaName":"##ReferenceSchemaName##File",
    "viewModelClassName":"Terrasoft.FileTimelineItemViewModel",
    "viewClassName":"Terrasoft.UsrFileTimelineItemView",
    "orderColumnName":"CreatedOn",
    "authorColumnName":"CreatedBy",
    "captionColumnName":"Name",
    "messageColumnName":"Notes"
}

3) 'UsrFileTimelineItemView' is a new Module with source code copied from 'FileTimelineItemView' with the addition of the 'getMessageViewConfig' method copied from the example (note I am using the original viewModelClassName 'FileTimelineItemViewModel'):

 define("UsrFileTimelineItemView", ["BaseTimelineItemView"], function() {
	/**
	 * @class Terrasoft.configuration.FileTimelineItemView
	 * File timeline item view class.
	 */
	Ext.define("Terrasoft.configuration.UsrFileTimelineItemView", {
		extend: "Terrasoft.BaseTimelineItemView",
		alternateClassName: "Terrasoft.UsrFileTimelineItemView",
 
		// region Methods: Protected
 
		/**
		 * Returns file type icon view config.
		 * @protected
		 * @return {Object}
		 */
		getFileTypeIconConfig: function() {
			return {
				"name": "FileTypeIcon",
				"itemType": Terrasoft.ViewItemType.IMAGE,
				"getSrcMethod": "FileTypeSrc",
				"generator": "ImageCustomGeneratorV2.generateSimpleCustomImage",
				"onPhotoChange": Terrasoft.emptyFn,
				"classes": {
					"wrapClass": ["timeline-item-file-type-icon"]
				}
			};
		},
 
		/**
		 * Returns file preview image view config.
		 * @protected
		 * @return {Object}
		 */
		getFilePreviewImageConfig: function() {
			return {
				"name": "FilePreviewImage",
				"itemType": Terrasoft.ViewItemType.IMAGE,
				"getSrcMethod": "getPreviewImageSrc",
				"generator": "ImageCustomGeneratorV2.generateSimpleCustomImage",
				"onPhotoChange": Terrasoft.emptyFn,
				"classes": {
					"wrapClass": ["timeline-item-file-preview-image"]
				}
			};
		},
 
		/**
		 * @inheritdoc Terrasoft.BaseTimelineItemView#getCaptionViewConfig
		 * @protected
		 */
		getCaptionViewConfig: function() {
			var config = this.callParent(arguments);
			config.target = "_self";
			delete config.click;
			return config;
		},
 
		/**
		 * @inheritdoc Terrasoft.BaseTimelineItemView#getLeftHeaderViewConfig
		 * @protected
		 */
		getLeftHeaderViewConfig: function() {
			var leftHeaderConfig = this.callParent(arguments);
			leftHeaderConfig.items.splice(1, 0, this.getFileTypeIconConfig());
			return leftHeaderConfig;
		},
 
		/**
		 * @inheritdoc Terrasoft.BaseTimelineItemView#getBodyViewConfig
		 * @override
		 */
		getBodyViewConfig: function() {
			var bodyConfig = this.callParent(arguments);
			bodyConfig.controlConfig.visibilityHeight = 0;
			bodyConfig.visible = {
				"bindTo": "isFilePreviewImageVisible"
			};
			bodyConfig.items = [
				this.getFilePreviewImageConfig()
			];
			return bodyConfig;
		},
 
		// endregion
 
        // Redefined method returning the [Message] tile field configuration. 
        getMessageViewConfig: function() {
            // Receiving standard settings.
            var config = this.callParent(arguments);
            // Visibility setup. Visible if the tile is deployed.
            config.visible = {
                "bindTo": "IsExpanded"
            };
            return config;
        }
 
	});
});

 

Like 0

Like

1 comments

Hi all,



In Creatio 7, is there a way to nest a detail within a field group?



 

Like 0

Like

1 comments

Nevermind, I've found a solution by changing the parent name to the field group name.

 

				"operation": "insert",
				"name": "My Detail",
				"values": {
					"itemType": 2,
					"markerValue": "added-detail"
				},
				"parentName": "My Field Group",
				"propertyName": "items",
				"index": 1

 

Show all comments

Hello Community,

 

Our client has a case where he needs to upload a file secured with a password to the attachment details. He tried to upload that file file but with no success. Is there a way to keep that file in its encrypted format and be able to upload it?

 

Thank you,

Like 0

Like

2 comments

...

Hello Mariam,



You can make a password file in the archive and put the archive in the detail. At the moment there is no possibility to enter the password exactly inside Creatio. Perhaps this can be implemented by custom development.



Regards,

Anton

Show all comments