Is there any way to apply multiple sorting rules on section page? 

 

For example, on case page I need to sort the list by priority first if the priority is same then, apply the status rule. 

 

One more thing I want to apply this rule as by Default so every time any user visit case section page, the user by default sees the list in given as above manner. 

 

If anyone has any information regarding the same do let me know.

Like 1

Like

1 comments

Hi Meet,

 

Not sure it's possible in the current Creatio logic since here is the part of DataGrid object declaration from the BaseDataView schema:

"operation": "insert",
                "name": "DataGrid",
                     ...........
                    "sortColumn": {"bindTo": "sortColumn"},
                    "sortColumnDirection": {"bindTo": "GridSortDirection"},
                    "sortColumnIndex": {"bindTo": "SortColumnIndex"},

As we can see there are three main parameters that are responsible for grid sorting: sortColumn, sortColumnDirection and sortColumnIndex. Each of them calls either the sortColumn function or changeSorting function from the GridUtilitiesV2 schema where the value is set for these attributes. And the problem is that these functions can only get one column as an argument.

 

Overriding this logic won't be an easy task since there are two functions and the DataGrid object that should be modified. Our core R&D team has a problem registered on their end to make it possible to sort the grid using several columns and this idea is added to the system functionality improvement roadmap. So it's better to wait until the out-of-the-box solution is deployed and tested.

 

Best regards,

Oscar

Show all comments

Hello Community, 

 

I have requirements to show How much time has passed till case has been registered in the system. 

 

But the real catch is, the information I have to show on Section list like shown as below.

Here I want to add Passed time column near Resolution time. 

Passed time is time passed till registration of Case. 

 

And also, I want to do same on Dashboard’s list view.

Like 0

Like

1 comments

Hello Meet,

 

Here is an example of how I did it on my side:

 

1) Create a button in the CaseSection schema:

{
					"operation": "insert",
					"name": "CustomButtonContainer",
					"parentName": "ActionButtonsContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.CONTAINER,
						"items": []
					}
 
				},
				{
					"operation":"insert",
					"name": "RecalculateTimeSpent",
					"parentName": "CustomButtonContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"caption": {bindTo: "Resources.Strings.RecalculateTimeSpentButtonCaption"},
						"click": {bindTo: "updateCaseTimePassed"},
						"style": Terrasoft.controls.ButtonEnums.style.RED
					}
				}

As a result the button will appear in the section:

Also don't forget to add the localizable value with "RecalculateTimeSpentButtonCaption" caption.

 

2) Create a string column in the "Case" object with "UsrTimePassedFromCreation" code and Text (250 characters) data type. Save and publish the object.

 

3) Display this created string column in the "Cases" section.

 

4) Add these methods to the CaseSection schema:

updateCaseTimePassed: function(){
				const today = new Date();
				for (let i = 0; i<this.get("GridData").collection.items.length;i++){
					let recordId = this.get("GridData").collection.items[i].values.Id;
    				let result = (today - this.get("GridData").get(recordId).get("CreatedOn")).toString(); //ms
					let diffDays = Math.floor(result / 86400000); //days
					let diffHrs = Math.floor((result % 86400000) / 3600000); // hours
					let diffMins = Math.round(((result % 86400000) % 3600000) / 60000); // minutes
					let resultMessage = diffDays + " days " + diffHrs + " hours " + diffMins + " minutes";
					let updateQuery = Ext.create("Terrasoft.UpdateQuery", {
							rootSchemaName: "Case"
						});
						let filters = updateQuery.filters;
						let caseIdFilter = updateQuery.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,
								"Id", recordId);
						filters.add("caseIdFilter", caseIdFilter);
						updateQuery.setParameterValue("UsrTimePassedFromCreation", resultMessage, Terrasoft.DataValueType.TEXT);
						updateQuery.execute();
				}
				this.sleep(2000);
				this.updateSection();
			},
			sleep: function(milliseconds) {
  				const date = Date.now();
  				let currentDate = null;
  					do {
    					currentDate = Date.now();
  					} while (currentDate - date < milliseconds);
			}

5) Refresh the page and check the result - the values should populate for all records in the grid upon clicking the added button:

So you will periodically need to click the button to update information on the case time spent. Also you can add additional check for the case status so not to update records that are in "Resolved" or "Closed" status or you can build a filter with cases that are in the "In progress" status and use the button on them only.

 

Also please note that since the data is updated in the database directly you will see the same data in any dashboard representing cases.

 

Best regards,

Oscar

Show all comments

Dear all,

Is it possibile to set record author when it is imported? 

Like 0

Like

1 comments

Dear all,

 

I think I found the solution to my problem.

The owner field of the account entity is the author of the record

Can you confirm is it the right way ?

Show all comments

Hi community,

 

Few year back someone overrode this save method as you can see in the below attached image.

now this has became  a third party schem for me.

 

I want to remove this implementation(what all written inside save), because it is restricting the user from saving the record now.

 

What I have tried is creating the replacing client schema for the above schema and again overriding the save method as : 

save : function() 

this.callParent(arguments);

}

but it didn't worked.

 

Now, what all I am trying to do is to call the base implementation of Save method by skipping all the overriding implementaion therefore I also tried this : 

save : function() 

this.callSuper(arguments);

}

but it didn't work either.

 

Can someone help me how can I achieve this.

 

Many thanks!

 

Like 1

Like

4 comments

Dear Akshit,

 

save : function() should have solved your task. Have you debugged the code to find why it did not work?

 

Best regards,

Angela

 

Hi Angela Reyes,

 

Thank you for the response,

 

I haven't tried to debug this code.

 

I thought there is some way to call the base implementation of Save by skipping the overriding versions of the same(Save method).

 

So according to you below should work : 

Save : function () 

{

this.callParent(arguments);

}

 

Ok, I will debug and will respond back here.

 

 

 

Akshit,

 

If you want to call the base save function then you don't need to override the save function at all. Without overriding the system takes the base save function and executes it. But if you need to store some additional logic upon saving the record you need to callParent the parent save function and then your additional actions that the code is supposed to call. 

 

Best regards,

Oscar

 

Akshit,  Hello ,

Did you find a solution to this problem

Thank you 

Show all comments

Hi Community,

 

Does creatio has built in RestSharp library? Thanks.

Like 0

Like

1 comments

Dear Fulgen,

 

Yes, Creatio has RestSharp library located in RestSharp.dll 

 

Best regards,

Angela

Show all comments

Dear, how can I see the code to create a database view? For example, I have a UsrVwContactAddress view and I would like to get the creation code for that view in sql console:

CREATE VIEW dbo.UsrVwContactAddress
AS
SELECT...

 

Thanks!

Like 0

Like

2 comments

Hi Sebastian, 

 

Here are the example how you can do it:

 

 

Best Regards, 

 

Bogdan L

If this is a cloud system, and you don't have access to local tools, you can use the following commands via SQL Executor to get the SQL for the view.

If database is MSSQL:

SELECT
    definition
FROM
    sys.sql_modules
WHERE
    object_id = object_id('viewname');

If database is Postgresql:

select pg_get_viewdef('"viewname"', true)

Ryan

Show all comments

Hello,

What is the shortcut keys for the new built-in IDE? In the old version, I can use Ctrl|Cmd + / to comment out multiple lines. But I cannot do that in the new version.

 

Like 0

Like

3 comments

The new editor is based on the Code Mirror editor. I've outlined some of the most common shortcut keys here https://customerfx.com/article/tips-for-working-with-the-new-code-edito…

You can see the complete list of shortcut keys on the Code Mirror website in the Commands section, although not all of them are implemented in the Creatio editor (and I don't see one to comment/uncomment multiple lines although Code Mirror does have a comment addon and I've not checked if it implements this - or if the Creatio implementation includes that) https://codemirror.net/doc/manual.html#keymaps

Ryan

Thank you, Ryan. So far, I still wait for somebody from Creatio to tell if there is shortcut key for comment multiple lines, or a promise to include that feature in next release.

Van Ly,

We are using CodeMirror to write code in the designer so all shortcuts can be found here: https://defkey.com/codemirror-shortcuts

Unfortunately, comment out multiple lines shortcut is not present in the list. 

 

Best regards,

Angela

Show all comments

Hi Community,

 

I have a configuration Service, how can I execute my Business process inside my configuration service?

 

By the way my business process includes opening an edit page. Is this possible?

 

 

 

 

Thanks

Like 0

Like

3 comments
Best reply

Fulgen Ninofranco,

 

The problem here is that the page will be created, but it is not opened automatically and remains in the CTI-panel on this tab:

But you can open it by clicking the page name in the CTI-panel (Test in our case on the screenshot below). And it seems that it is not possible to open this page not in the background, but I've created a problem for our R&D team so they could modify the ProcessEngineService so to allow opening auto-generated and pre-configured pages not in the background in case they are called via Web-service.

 

Best regards,

Oscar

Dear Fulgen, 

 

You can use this article: https://academy.creatio.com/docs/developer/integrations_and_api/process… to launch the process from web-service.

 

Best regards,

Angela

Angela Reyes,



Hi Angela, I am able to launch the business process. I can also see it In my process log that the BP was triggered successfully. But edit page is not opening. Is it possible to launch BP with edit page via configuration service? If possible, how?

Fulgen Ninofranco,

 

The problem here is that the page will be created, but it is not opened automatically and remains in the CTI-panel on this tab:

But you can open it by clicking the page name in the CTI-panel (Test in our case on the screenshot below). And it seems that it is not possible to open this page not in the background, but I've created a problem for our R&D team so they could modify the ProcessEngineService so to allow opening auto-generated and pre-configured pages not in the background in case they are called via Web-service.

 

Best regards,

Oscar

Show all comments

Hi Community,

 

I have a Configuration service which saves new record on Account. I am saving new record using Entity.Save(). How can retrieve the record Id of the new record after calling Entity.Save()?

 

Thanks

Like 0

Like

1 comments

Hi Fulgen,

 

Here is the example of my process that I called using the /0/ServiceModel/ProcessEngineService.svc/UsrAddNewExternalContact/Execute endpoint and that returned an Id of the created contact in the auto-generated page that was launched in the background:

The code of the script task is:

var schema = UserConnection.EntitySchemaManager.GetInstanceByName("Contact");
var entity = schema.CreateEntity(UserConnection);
var ContactName="This is contact created via a process";
var ContactPhone="13222123";
entity.SetDefColumnValues();
entity.SetColumnValue("Name", ContactName);
entity.SetColumnValue("Phone", ContactPhone);
entity.Save();
EntitySchemaQuery query = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Contact");
query.PrimaryQueryColumn.IsAlwaysSelect = true;
var entities = query.GetEntityCollection(UserConnection);
List<object> contacts = new List<object>();
foreach (var item in entities){
if (item.GetTypedColumnValue<Guid>("Id") == entity.GetTypedColumnValue<Guid>("Id"))
{
	var contact = new
    {
        Id = entity.GetTypedColumnValue<Guid>("Id"),
    };
    contacts.Add(contact);
}
}
Set("ContactList", JsonConvert.SerializeObject(contacts));
return true;

So the idea here is to create a contact calling a process from outside (you can modify the code and pass ContactName and ContactPhone as actual parameters when calling /0/ServiceModel/ProcessEngineService.svc/UsrAddNewExternalContact/Execute), execute the entity.Save(); and then find the created contact and return its Id on the autogenerated page. As a result I've received this Id:

and the contact was created in the system:

So you need to use something similar in your webservice.

 

Best regards,

Oscar

Show all comments

Dear Community,

Happy New Year ! 

 

I noticed a strange problem on cloud environment with 7.17.0 version.

When i'm trying to bind SysImage data to my package i can't choose the columns

"Data" and "PreviewDate".

Here is the list of available columns:

I tried to do the same on Demo Marketing Environment with 7.17.1 

and i haven't seen this problem, the columns were available for data binding.



 

I checked that Columns "Data" and "PreviewData" have Usage mode = General in SysImage object. 

 

Do you know what might be the root cause of this problem?

 

Thank you in advance,

Anna

Like 0

Like

0 comments
Show all comments