Question

Hi All, 

 

I have this code - 

But I am getting this error - 

Error: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

 

I checked in the database and yes there are Null values stored in the columns, how can I keep null as well.

 

Thanks

 

Like 0

Like

1 comments

Hello.
Thank you for your question.

Please provide more details on the issue you've faced. Where exactly the issue occurs (custom webservice, business process etc.), which database type is used in your local installation (MS SQL, PostgreSQL or Oracle), which value is stored in the database record in the specific column of DateTime type, which is the column settings in the database (which type is used?), what is the error message in the Error.log?

It is very unclear how you are getting that exception but this article might be handy.

I am eager to receive your answer! 

Show all comments

Hi Everyone, 

 

How can I set the Approved On (Date field) with current date and Approved by (Lookup on contact) with current user when Approval status = Approved. in Freedom UI.

 

Thanks in Advance.

Like 1

Like

1 comments

Good day, 

You can use business processes for this purpose.

You can receive a signal on change of the status of the Approval
Receive signal
after which you can read the details of the said approval
Read details
and modify the approver to correspond to the current user 
and the date to correspond to the current date as follows:
Modify approverModify date

 

Show all comments

Hello, 

I've 3 own pages, which are binding with my the same model. When I add some value in first page and clicked button where I set action Save data and open next page it works good also I have Business process where I can get record ID but this BP will stop. 

But now I'm entering next information on the next page and I don't know how to pass data from 2 pages to my the same BP or new BP and save it in the same record.

 

Creatio version: 8.1.2.39.42

Could you give me some advise how to resolve this issue ?

I'll appreciate any help.

Like 0

Like

1 comments

Hello,

To ensure that the process does not stop, you can use parallel branching and add a “Wait for Signal” element in the business process. In this element, you can insert your record ID and configure a signal for changes in the record. After clicking the button, the record is saved, and the signal will be triggered. You can then place a sub-process or continue the algorithm in the existing business process if you need to use the new data for further actions.


Additionally, you can merge the parallel branches into one using the signal trigger. You can plan ahead what signal this will be and configure it so that the execution logic is always correct. I have also provided an example of a business process design that might be useful to you and serve as a foundation for creating the appropriate business logic you need.



Thank you for reaching out!

Show all comments

Hi Everyone,

I need to add button in the standard list (say Contacts). On click of this button, I want to call custom web service function. Is there a way I can do that. Is there any alternative available for the same.

Thanks,
Manoj

Like 0

Like

6 comments

Hello Manoj,
Thank you for your question.

There is an article available on the Academy that covers this topic with an example.

Regarding following question: "Is there any alternative available for the same". 

It depends on what you mean here. You can call a web service from different parts of an application. For example, you can make a business process that makes a call to a web service (link).

Hope this helps, let me know if you have any question left.

Yevhenii Grytsiuk,

Hi Yevhenii,

Apologies if my previous message was unclear. I want to add a button to each row in the native list, specifically as a column, and trigger a web service call when this button is clicked to sync data from another system.


 

For example, I need to add a sync icon as a column in the Project List. When the sync button for Project 1 is clicked, it should call the web service to sync data related to Project 1 from another system. Similarly, clicking the sync button for Project 2 should sync data related to Project 2, and so on.
 

I hope this clarifies my request. Thank you!

Manoj Patil,

You can add the following to the diff of the section: 

{
	"operation": "insert",
	"name": "DataGridActiveRowSyncButton",
	"parentName": "DataGrid",
	"propertyName": "activeRowActions",
	"values": {
		"className": "Terrasoft.Button",
		"style": "green",
		"tag": "sync",
		"caption": "Sync"
	}
}

 

This will add the button. Then for handling the click, add this to the methods:

onActiveRowAction: function(buttonTag, primaryColumnValue) {
	this.callParent(arguments);
 
	if (buttonTag === "sync") {
		// do your stuff here
		// primaryColumnValue is the row's Id value
 
		// you can get other values from the row using
		var row = this.getActiveRow()
		var val = row.get("UsrSomeColumn");
	}
}

Ryan

Ryan Farley,

Hi Ryan,
 

Thank you for the details. 

This section is created via Section Wizard and it correctly appears in Application Hub. However, I do not a find a place where this code needs to be added. Please guide me on the same as I am unsure if I am missing anything here.

The Section wizard creates two client schema files. One ending in "Page" and one ending in "Schema". The one ending in "Schema" is the one you want to add this code to. To see these files you need to look at the contents of the package containing your customizations, either by opening Advanced Settings from your application in App Hub or using the Advanced Settings link in the System designer.

Ryan

Ryan Farley,

I am unable to locate the System Designer icon on the Project List Page. See below screengrab.

I went to Advanced Settings and didn't find the schema files ending with "Page" and others ending with "Schema". See below screengrab.


Therefore, I navigated to Application Hub, Navigation Sections, and Selected Project which opened Projects: Section. 

 

In the Section Pages, I selected Edit Page which opened the Section Wizard screen with Tabs Pages, Business Rules, and Source Code at the top of the screen. 

 

I clicked on the Source Code tab and pasted the code at this place but it didn't reflect the new button in the list. 

 

 

I am unsure why the System Designer icon does not appear on the Project List screen. (Could it be a Creatio Version Issue? I am using Version 8.1.3.6734)
Why schema files ending with "Page" and "Schema" are not available in the Advanced Settings. (Could it be a Creatio Version Issue? I am using Version 8.1.3.6734) 
I assume I am placing the code on the Project Detail page and not on the Project List Page.

Show all comments

Hello All, 

 

I have created code to load Custom Page. How i can add the await in Creatio Client Module function to read Object Data

 

Code Sample : 

define("UsrCustomFunction", [], async functio(){
                
       // API call Terrasoft.EntitySchemaQuery, to read the creatio table.
       var getProcessData = function(){

              var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
                      rootSchemaName: "UsrGUMUProcessList"
              });

              esq.addColumn("Id");
              esq.addColumn("UsrName");


              return new Promise(function(resolve, reject) {
                     esq.getEntityCollection(function(response) {
                     if (response.success) {
                             resolve(response.collection);
                      } else {
                             reject(new Error("Failed to retrieve data: " + response.errorInfo.message));
                      }
               }, this);
             });

           }

 

             // [ Is it possible to add await or any other solution available for this? ]
             var processData = await getProcessData(); 
            
             //Process and return the Config based on the processData.
             return {
                 viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/
             };

});

 

 

Is this good solution to Create Custom Page in Creatio or any other solutions are available, then please assist me.

 

Regards,

Ajay K

 

Like 1

Like

1 comments

Hello Ajay,

Thank you for your question.

I suggest you to change your approach. You can override a default crt.HandleViewModelInitRequest  handler that is called before a page is fully rendered. There you might want to put your API call and depending on the result open a specific page. 

Here is a code snippet on how this might lookcode
In this case you also need to add @creatio-devkit/common dependency to schema dependenciescode

It is not recommended to dynamically modify entire schema configuration. Thus a better solution in your case could be binding your API call response to page element properties such as "visible" or "enabled".

Some helpful articles on the Academy: 
1. Generic handlers.
2. Open a Freedom UI page from a handler

Hope this helps and let me know if you have any questions left!
 

Show all comments

Hi Everyone, 
 

I have a customization task to read data from let's say "Project" table and insert into external Database. I am using ESQ for this in a source code (screenshot attached).

"Project" have more than 20000 records in it, and we are getting this error message -

Please suggest what we can do to change this limit.

Thanks in advance. 

Akshit

Like 1

Like

3 comments

If all this is doing is reading data, instead of using an ESQ, use the Select class or direct database query. Neither option will have the 20,000 record limit.

Be aware that both of these options are reading direct from the database tables, bypassing any record access security, etc.

Note, if you want to stick with using ESQ you can page back the results using RowCount and SkipRowCount to read pages less than 20K at a time.

Ryan

Ryan Farley,

Thank you for your response, I have to first read data and then I need to push this data to external Database. So more specifically in this case I am reading data from Project table in creatio and then I have to upsert data to Project table in external Database (outside creatio)  by iterating on the records I will read. 

Do you think Select class or direct database query this will work in this case? 

 

Thanks.

AS,

Yes either one should work fine, and will likely run faster than using ESQ since it's not adding all the other logic in the Creatio entity model and just reading the data directly from the database.

Ryan

Show all comments

Hello Community,

 

I want to Create the Custom Page as shown in Image where, I can List the Custom UI Card Based on the Table Rows of Creatio. also I want to run the particular Process of the Creatio on click of the Button.

 

Give me any reference for this, if available.

 

Regards,

Ajay K

 

Like 0

Like

1 comments

Hi,

I'm trying to add a live calculated field onto a Freedom List.

When 2 columns are set (e.g. Start Time, End Time) I want the Duration Column to be updated with the time difference. (With the picture below the Duration column should be set to "1hr")

 

 

Is there a way to do this?

Like 1

Like

1 comments

Hi,
 

You can implement logic similar to the DurationInMinutes and DurationInMinutesAndHours fields in the Activity object (CrtCoreBase).
 

You can check the logic for calculating these columns and build similar event-driven logic (an object-level process).
 

Method: CalculateDurationOnSaving();
 

img1


img2

img3


Alternatively, you can build a business process that will trigger when the Start Time or End Time fields are changed and calculate the required Duration field using a formula.

https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/business-process-setup/process-formulas

Best regards,
Pavlo!

Show all comments

Hi team,

 

I want to show/hide a custom button depending on a field of an opportunity, in the page what I do is to create an attribute with dependencies to this field to call the method that points to the property of the diff  (visible/enabled), but in the section I can't do this. I would like to know how I can make the same thing of the example below in the section.

 

The attribute I made in the page: 

"SubastaValidate": {
               dependencies: [{
                   columns: ["Stage"],
                   methodName: "ShowButton"
               }]
           },

In the diff of the page add the property:

"enabled": {
                        "bindTo": "ShowButton"
                    },



Thanks in advance,

Nicolas

Like 0

Like

1 comments

Hello Nicolas,
Thank you for you question.

If i understood you correctly you successfully binded field value change to attribute in your record page but you could not achieve same result in the section page. It might be because those two pages have different fields (e.g in record page there are fields related to that specific record and in section page there is information related to the list of those records). 

In section page i created a method that checks status of selected row. If the status of an order is completed than a button becomes hidden.

Here is how i accomplished that: 


Alternatively you can directly subscribe to changes in ActiveRow in your section page by overriding init method as follows:

Hope this helps and let me know if you have any other question left!

 

Show all comments

The records of associations in the MailboxFoldersCorrespondence and ActivityFolder tables exist, but when an email arrives, the Activity is not linked to the ActivityFolder, ActivityInFolder is empty. As a result, all emails are not associated with the folder on the mail server in which they are located.

How can I fix it?

 

Like 0

Like

1 comments

Dear Sergey,

 

Could you please provide us with an example and more details of this issue?

 

Thank you in advance!

Show all comments