Hello Community,
Here is the scenario Im truing to solve.

We Have Opportunity (parent page) in freedomUI and Contact In Opportunity in Classic UI.

We want to capture the following event. When we click Close in 'Contact in opportunity', we want to capture this event, in the Opportunity Form Page. 

The scope behind this is to perform a list reload of the Contacts(have already tried Enable live update in the entities-doesnt work)

How can this be achieved?

Sasor

Like 0

Like

8 comments

++++

Hello,
 

You can implement the following code to reload the data source when you get to the Freedom UI page on the crt.HandleViewModelInitRequest.
 

Sample implementation for “Opportunities_FormPage”

define("Opportunities_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
...
        handlers: /**SCHEMA_HANDLERS*/[
              {
        // Load data grids
      request: 'crt.HandleViewModelInitRequest',
      handler: async (request, next) => {
          console.log("You returned to FreedomUI page");
            const result = await next?.handle(request);
            const handlerChain = sdk.HandlerChainService.instance;
            await handlerChain.process({
                type: 'crt.LoadDataRequest',
                $context: request.$context,
                config: {
                    loadType: "reload"
                },
                dataSourceName: "ContactRolesListDS"
            });
            return result;
      }
  }

Serhii Parfentiev,

Hello Serhii,

Have you actually tried it ? HandleViewModelInitRequest is not even triggered when you close the classic ui page (nothing in the console log)

Sasor

++++

++++

++++

++++

+++++++

Show all comments

Hi,

I am trying to build a business process that will automatically generate an excel report using the Generate Excel Report task, available through package IntExcelReport.

In the business process Convert File to Base64String I pass the file that is generated from Generate Excel Report task.

 Convert File to Base64String business process is as the following picture: 

In the script task I have the following code:

 

But the when I try to get the content of the File parameter (FileParam bp parameter) I get a null value.

What else should I try, or am I not configuring it right?

Thank you in advance

Like 1

Like

2 comments

Hi, trying also to figure out how to use this new excel process element to send the report by email. Documentation has not been updated in the marketplace. Anyone figured it out ?

It's strange since I receive

 

System.InvalidCastException: Unable to cast object of type 'Terrasoft.File.EntityFileLocator' to type 'Terrasoft.Configuration.File'.
   at Terrasoft.Core.Process.ProcessModel.GetParameterValue[T](FoundParameterData result)

 

And I do everything in the same manner:

 

  1. Main process

Sub process

Process log

So what am I doing wrong?

 

If it's working on your end: I don't see the usage of FileAPI in the script task that is required and your app may use S3 file content storage and this can be the first reason for the empty file data. The second possible reason is that you check the file data using the tracing or you don't see file data since it's not saved in the memory of the app because of the system feature related to storing process parameters in the memory. This data should be then used in some interactive element or used in the process Formula element so it could be available in the application memory.

Show all comments

Hello

 

I'm trying to make the approval comment field mandatory for a DCM. The idea is that  the approval cannot be approved or rejected if a comment hasn't been added to the section. That is, all approvals need to have a comment added to them.

 

I try to marked the comment as obligatory in the object "Basevisa" but it didnt work. 

 

Any idea how can I make the comment mandatory. 

 

Thank you 

 

 

 

Like 1

Like

1 comments

Hello Laura,

 

In classic UI there are two approaches: either one provided here (but don't forget to disable the AcceptApprovalWithoutComment system setting) or creating a replacing view module for the PreconfiguredApprovalPage and add this code:

define("PreconfiguredApprovalPage", [],
	function() {
		return {
			attributes: {},
			methods: {
				save: function() {
					const approvalComment = this.get("Comment");
					if (approvalComment.length > 0) {
						this.callParent(arguments);
					} else {
						Terrasoft.showErrorMessage("Comment is mandatory");
					}
				}
			},
			diff: /**SCHEMA_DIFF*/ [] /**SCHEMA_DIFF*/
		};
	});

As for the Freedom UI - as was mentioned here and here - this is not avialable in Freedom UI as for now. I will notify our R&D team about your question to prioritize the task to develop the logic for them.

Show all comments

i try to deploy creatio in linux vmware but i cannot login in the login page when make a succesfull login attempt got comeback to login page again in the console i get this some kind error message can you guys help me

 Failed to resolve type Terrasoft.Core.QueryExecutionRules.IQueryRuleApplier
 
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Terrasoft.Core.QueryExecutionRules.QueryRuleApplier -> Terrasoft.Core.QueryExecutionRules.QueryRuleApplyLogger -> Terrasoft.Core.QueryExecutionRules.QueryRuleApplyLogRepository -> λ:Terrasoft.Core.UserConnection.

 

Like 0

Like

1 comments

Hello!
 

To resolve this issue, please submit a request via email to support@creatio.com.

What we need from you:

  1. Website logs.
  2. Binary files (if possible).
  3. An anonymized copy of the database (if it's a default database and doesn't contain sensitive data, please provide it).


Thank you for reaching out! We’ll be happy to assist you!

Show all comments

I would like to disable the mini page that appears before the main page in Freedom UI. Currently, when we click on "Next Step," it first opens a mini page before navigating to the main page. Instead, I want it to directly open the main page without this intermediate step.

Like 3

Like

3 comments

Hello,

 

When clicking on the "Complete" button from the next steps, the system will show you the Freedom UI mini page, as this is a Next Steps core logic.

The only way to avoid opening this mini page is to develop your only Next Steps tiles and assign different logic for the complete button.

Dymytriy Vykhodets,

can you please help me where this core logic is written. so that i can try to create new logic.

Dymytriy Vykhodets,

the idea is to open the main page in place of mini page when we click on complete button

Show all comments

Trying to create new Reminding with link to Call or Contact collection objectby oData4 request. Is it possible?
With Action collection everything fine. But with Call (or Contact) collection Id request only red point appears near bell symbol, but list of remindings is empty.

Like 0

Like

2 comments

Hello!

 

If you mean create remindings with link to specific record. You actually can manage something like this with the business process by adding notifications with an edit page element. And then trigger this process by odata.

Kyrylo Atamanenko,

Thank you, Kyrylo

I mean, which collection UId from the list of {{BaseURI}}/0/odata/SysSchema should be specified in the "SysEntitySchemaId" field in the POST request  {{BaseURI}}/0/odata/Reminding in order to create a notification not bound to an Action, but Contact or Call? Is it possible to create this kind of notification without changing the default configuration of Creatio?

Show all comments

Hello everyone,

I'm working on a custom duration validator in Creatio, but I'm running into an issue where the function returns invalidMessage before the validation logic completes.

Here’s a simplified version of my function:

durationValidator: function(){
                var invalidMessage="";
                var name=this.get("UsrNameLookup").value ?? null;
                var currentDuration=this.get("UsrDurationMinute");
                if(!name){
                    return;
                }
                var esqDuration = this.Ext.create("Terrasoft.EntitySchemaQuery", {
               rootSchemaName: "UsrPerformances"
           });
                esqDuration.addColumn("UsrDurationMinute");
                // var groupFilters = this.Ext.create("Terrasoft.FilterGroup");
                
                var totalDuration = 0;
                if(this.isAddMode()){
                    var nameFilter = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "UsrNameLookup", name);
                // groupFilters.addItem(filterId);
                esqDuration.filters.add("esqFirstFilter",nameFilter);
                    esqDuration.getEntityCollection(function(result) {
                   if (!result.success) {
                       this.showInformationDialog("Request error");
                       return;
                   } else {
                       result.collection.each(function(item) {
                               totalDuration += item.get("UsrDurationMinute");
                           }
                       );
 
                   }
                   totalDuration += currentDuration;
                        console.log(totalDuration);
                   this.Terrasoft.SysSettings.querySysSettingsItem("UsrMaximumDuration", function(maxDuration) {
                       // console.log("td"+totalDuration);
                       if (totalDuration > maxDuration) {
                            this.set("Numbervalue", false);
                           this.showInformationDialog("No more than " + maxDuration + " total performances duration is allowed.");
                            invalidMessage= "No more than " + maxDuration + " total performances duration is allowed.";
                            return{
                                invalidMessage: invalidMessage
                            };
                       } 
                        else {
                            this.set("Numbervalue", true);
                            invalidMessage="";
                            return{
                                invalidMessage: invalidMessage
                            };
                       }
                   }, this);
 
               }, this);
                }else{
                    console.log("else");
                    var nameFilter = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "UsrNameLookup", name);
                
                
                    var idFilter = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.NOT_EQUAL, "Id", this.get("Id"));
                    esqDuration.filters.logicalOperation = Terrasoft.LogicalOperatorType.AND;
                    esqDuration.filters.add("esqFirstFilter",nameFilter);
                    esqDuration.filters.add("esqSecondFilter", idFilter);
                    esqDuration.getEntityCollection(function(result) {
                   if (!result.success) {
                       this.showInformationDialog("Request error");
                       return;
                   } else {
                       result.collection.each(function(item) {
                               totalDuration += item.get("UsrDurationMinute");
                           }
                       );
                       // console.log("i am running");
                       // let prevduration=this.get("UsrprevDuration");
                       // console.log("previous duration"+ prevduration);
                       totalDuration += currentDuration;
 
                   }
                    console.log(totalDuration);
                   this.Terrasoft.SysSettings.querySysSettingsItem("UsrMaximumDuration", function(maxDuration) {
                       // console.log("td"+totalDuration);
                       if (totalDuration > maxDuration) {
                            this.set("Numbervalue", false);
                           this.showInformationDialog("No more than " + maxDuration + " total performances duration is allowed minutes.");
                            invalidMessage="No more than " + maxDuration + " total performances duration is allowed.";
                            return{
                                invalidMessage: invalidMessage
                            };
                       } else {
                           this.set("Numbervalue", true);
                            invalidMessage="";
                            return{
                                invalidMessage: invalidMessage
                            };
                       }
                   }, this);
 
               }, this);
            
                    
            }
                console.log(invalidMessage);
                return{
                                invalidMessage: invalidMessage
                            };
                },
 
 
The console.log(invalidMessage); statement always prints an empty string.
  • The function returns <strong>invalidMessage</strong> before the asynchronous operations (getEntityCollection and querySysSettingsItem) complete.
  • As a result, validation messages do not appear correctly.
Like 0

Like

4 comments

Jerome BERGES,

Thanks for answering, I tried different approach like this https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/getting-started/first-app/develop-application/step-3-add-page-validation and it works.

Is there any i can perform same validation on detail of some custom page.

Darshan Dev Prajapat,

The problem with the article you linked to and what you're trying to accomplish is that you're using asynchronous methods inside the validator, which won't work with a synchronous validation method since the validation method will return before you've retrieved the asynchronous results. You need to switch to the asyncValidate (see link provided by Jerome) in order to use asynchronous methods (such as EntitySchemaQuery, SysSettings retrieval, etc).

The main difference in the article you linked to and your code is that the article performs the ESQ outside of the validator, when the onEntityInitialized fires, not inside the validator (which is what you're doing). To do asynchronous operations like ESQ (and using SysSettings) you need to use the asyncValidate method.

Ryan

Ryan Farley,


Thanks for the detailed explanation. I am using onEntityInitialized for validation, and it is working for me. However, I would like to know if there is a way to perform the same validation where this performance detail is being used, such as on a custom page.

 

Show all comments

Greetings!

 

Have noticed that field BlindCopyRecipient in Activity is not being populated when receving an email, that was send using bcc field and specifying an email address that is configured for synchronization.  However email is synchronized and showing correctly in communication panel. Is it a bug or feature?

 

Like 1

Like

1 comments
Best reply

Hello, 

Such behavior is indeed reproduced when the recipients of the email are in the BCC field. If the "To" and "CC" fields are empty, and the recipients are in BCC, this behavior is expected. 

Logic behind how the BCC field works:
The BCC field in the letter is seen only by the sender, and only in the sent email folder. This behavior is based on the message data transfer logic at the email server level; the recipient in the blind copy does not have access to view the list in the BCC field. None of the recipients will see the blind copy (even if you send it to yourself). Therefore, the BCC field in Creatio will be filled in only in two cases: - the letter was sent from our system, and while sending, you need to specify the recipients in this field. - the letter was synchronized from the sent letters folder. In other cases, the BCC field in Creatio will be empty. Since for these emails, recipients were not specified in the "To" and "CC" fields, only in BCC, which according to the logic of the field's operation, we do not see, there is a situation where the email is synchronized, but there are no recipients. Please note that Creatio cannot influence this behavior in any way, as we only synchronize the email from the mail server with the same parameters as the parameters of this email. Since the "To", "CC", "BCC" fields are empty in Outlook itself, they will also be empty in Creatio. 

Best regards,
Ivan

Hello, 

Such behavior is indeed reproduced when the recipients of the email are in the BCC field. If the "To" and "CC" fields are empty, and the recipients are in BCC, this behavior is expected. 

Logic behind how the BCC field works:
The BCC field in the letter is seen only by the sender, and only in the sent email folder. This behavior is based on the message data transfer logic at the email server level; the recipient in the blind copy does not have access to view the list in the BCC field. None of the recipients will see the blind copy (even if you send it to yourself). Therefore, the BCC field in Creatio will be filled in only in two cases: - the letter was sent from our system, and while sending, you need to specify the recipients in this field. - the letter was synchronized from the sent letters folder. In other cases, the BCC field in Creatio will be empty. Since for these emails, recipients were not specified in the "To" and "CC" fields, only in BCC, which according to the logic of the field's operation, we do not see, there is a situation where the email is synchronized, but there are no recipients. Please note that Creatio cannot influence this behavior in any way, as we only synchronize the email from the mail server with the same parameters as the parameters of this email. Since the "To", "CC", "BCC" fields are empty in Outlook itself, they will also be empty in Creatio. 

Best regards,
Ivan

Show all comments

Hi everyone,

Trying to merging 2 different pairs of duplicate contact records and i receive the following errors: 

1. P0001: User with specified contact already exists
2. Npgsql.PostgresException: 42601

Has anyone ever encountered these errors? 

Like 0

Like

1 comments

Hi Shemroy!

This error can occur when the contacts you are trying to merge are linked to a system user.

When trying to merge them, the system attempts to link one contact to another user, but a contact cannot be linked to more than one user. This results in an error, since the system does not allow this situation.

Such user-linked contacts should not be merged. If necessary, you can deactivate one of the users and rename the contact to avoid confusion.

Since deleting a user is not supported by the system by design, deleting a contact linked to such a user is also not possible.
 

If you have any further questions, please let us know, we would be happy to help.
Thank you for choosing Creatio!

Show all comments

Hello, 

 

I've set 'Record deactivation' for my object. But I don't see any field for that in Data model attributes on my Freedom UI page.

 

How can I add this field 'Inactive' to Freedom UI page?

 

Thank you!

Like 1

Like

3 comments

Hello Vladimir,

I've the same question and I followed these steps for Contact section:

1. Create a replacement for the Freedom client schema. Please create a new client module, and for the URL in the browser, change schemaType=9 
for example like that: .../0/ClientApp/#/ClientUnitSchemaDesigner/new?packageId=db5d44a0-881e-ba1b-3396-a2dfae3fecee&packageName=test_contacts&schemaType=9
2. Set Parent object -  Contacts form page (Contacts_FormPage)

3. Change del module script 

viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
			{
				"operation": "insert",
				"name": "Checkbox_Custom",
				"values": {
					"layoutConfig": {
						"column": 1,
						"row": 2,
						"colSpan": 1,
						"rowSpan": 1
					},
					"type": "crt.Checkbox",
					"label": "$Resources.Strings.PDS_RecordInactive_Custom",
					"labelPosition": "auto",
					"control": "$PDS_RecordInactive_Custom"
				},
				"parentName": "SideAreaProfileContainer",
				"propertyName": "items",
				"index": 1
			}
		]/**SCHEMA_VIEW_CONFIG_DIFF*/,
		viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
			{
				"operation": "merge",
				"path": [
					"attributes"
				],
				"values": {
					"PDS_RecordInactive_Custom": {
						"modelConfig": {
							"path": "PDS.RecordInactive"
						}
					}
				}
			}
		]

Hello,
 

The solution provided by Stefano is a good one. 

An alternative solution was discussed in this post: https://community.creatio.com/questions/recordinactive-checkbox-missing-freedom, and you can use the approach from there.
 

However, we still recommend adding the required column directly via page metadata, as described above.
 

We already have a backlog task to address this issue in future versions of the application.
 

Thank you for reaching out!

Stefano Bassoli,

Hello Stefano,

 

I just followed your advice and it worked well, thanks!

However, is it possible to select the field in the conditions part of the business rules? It doesn't show up there either.

 

Thanks,

Robert

Show all comments