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

I'm faced with the problem that I can't get creatio packages from Clio Explorer. I feel that the problem is that when I open https://localhost:91/0/Shell/?simplelogin=true I get a 404 status code. The problem is specific to this instance. On the other instances where the packages are available, this link is available. Why is the request result 404?

 

Like 0

Like

1 comments

Hello,

Please try to log in to the application with your parameters.
Also, try running other commands, they may indicate errors:

clio pull-pkg <PACKAGE_NAME> -e <ENVIRONMENT_NAME>

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

In Classic UI there was a section at the top of Account and Contact pages where new Activities, Calls, Emails, etc. could be created and automatically connected to the current object.  Where are these tools hidden in Freedom UI??

Like 1

Like

2 comments

Hello,
To enable this section in Freedom UI, go to the Page Designer and add the "Next Steps" component to the page.

Hi John, 

1) Yes these were removed by default in Freedom UI, not sure why, especially on contacts. You need to add the next steps manually. 

2) The automatic linking surprisingly does not exist yet : https://community.creatio.com/questions/bewildered 

Cheers, 

Damien

Show all comments

Dear colleagues,

 

Any idea how to apply bussiness rules to an editable detail grid schema? just by code?

 

Is very usefull can edit in the grid, but just when have no rules, no read only fields, no filters, no calculated fields and so on.

 

Any ideas?

 

Thanks

 

Regrads

Julio

Like 0

Like

1 comments
Best reply

If i'm not wrong i guess you mean to say you have a inline editable detail without any form page for the user to add details and you want to add some kind of business rules.
You can add them in the object level.


But if you have a form page for the detail,you can do it through code by using handlers.
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…
 

If i'm not wrong i guess you mean to say you have a inline editable detail without any form page for the user to add details and you want to add some kind of business rules.
You can add them in the object level.


But if you have a form page for the detail,you can do it through code by using handlers.
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…
 

Show all comments

Greetings, we want to setup a trigger campaign to send to those members that turn 18 years of age. We have a dynamic folder setup for just these audiences. The question is, what would be the correct filter logic? This is what is currently setup in Creatio so far.

 

Any help is greatly appreciated. Thanks.

Like 0

Like

3 comments

Hello,

Could you clarify whether the goal is to send emails to the contact specifically on their birthday, or is it to send a newsletter to all contacts who have turned 18 this year?

Pavlo Sokil,

The goal is to send emails to the contacts that meet this criteria on their birthday or two days after their birthday.

Lucas Centeno,

 

Unfortunately, regular filtering won't work for these purposes.

 However, you can implement the following approach:
 

Create a separate column of type "Date" in the "Contact" object, for example, "18YearsDate," and populate it using a business process.


 This process should take the birth date from the "Birth Date" column, add 18 years to it, and set this value in the "18YearsDate" column. After that, you can set up a filter as follows:

18YearsDate = Today 
OR
 18YearsDate = Tomorrow, etc.
 

You can implement this calculation for the column using a formula  in the business process.
 

I hope this helps!

Show all comments