Dear colleagues,

 

I need to trigger a process to search for all pending approvals in a Freedom UI section, but I have not found a Visa object connected to Freedom pages. How can I approve all pending approvals connected to a specific object in a FreedomUI section via a process?

Like 0

Like

1 comments

Found, it is a single object for all entities: Approval, in the column "Reference schema name" must indicate the name of the object of the section where the Approval belongs and in the column "Entity identifier" the id of the object....

Show all comments

I have a validator function with the "async" flag set to true.  It is working however the error message is not showing when the record is saved and the validation fails.

		viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
			{
				"operation": "merge",
				"path": [
					"attributes"
				],
				"values": {
					"UsrCaptainReportsTo": {
						"modelConfig": {
							"path": "UsrYachtsDS.UsrCaptainReportsTo"
						},
						"validators": {
							"CaptainReportsTo": {
								"type": "usr.CaptainReportsTo",
								"params": {
									"message": "'Captain reports to' must be an affiliate in the yacht's affiliates list."
								}
							}
						}
					},
		validators: /**SCHEMA_VALIDATORS*/{
			"usr.CaptainReportsTo": {
				"validator": function (config) {
					return async function (control) {
						var validated;
						validated = false;
						//debugger;
						return validated ? null : { "usr.CaptainReportsTo": { message: config.message } };
					};
				},
				"params": [
					{
						"name": "message"
					}
				],
				"async": true
			}
		}/**SCHEMA_VALIDATORS*/

 

Like 0

Like

1 comments

Hello,

 

We've reproduced the issue in 8.1.3 and the only possible way to use the validator now is to use it synchronously (using "async": false). Our R&D team has created a task to fix this bug in future application releases and took it in progress. Thank you for reporting this issue to us and helping us in making the app better!

Show all comments

Is it possible to sort the quick filter list you get displayed with code in Freedom UI? I can see there is no way to do it through no code currently, but is there a handler that can be overridden to add sorting to the resulting list? Would be very useful in some circumstances. Maybe it will be done on the load data step using crt.LoadDataRequest in some way? Not sure what the config items that would need to be added to the request would be though.

Like 1

Like

3 comments

Hello Harvey,

 

Could you please elaborate on your business task? 

Simply, we need to sort the values displayed in the Quick Filter. In this case it's because the quick filter values correspond to periods in the client's period calendar, and we want to show them in descending order so that the current period is the first item in the list (the values selectable are the ones before the current period, so sorting by name descending would suffice, but it would definitely be useful to have a generalised way of sorting quick filter options).

Harvey,

 

Thank you for clarifying. There is no such OOTB option. However, I've registered the idea in our R&D team backlog for consideration and implementation in future application releases.

 

Thank you for helping us to improve our product. 

Show all comments

Hey, Community

I'm trying to implement a custom filtering logic for quickfiltering of records and to do the same i'm trying to retrieve the value  from the request using the crt.HandleViewModelAttributeChangeRequest. However, the value is being logged as Proxy(nt) due to security reasons.  I'm wondering if there's a way to bypass this limitation in order to obtain the desired result for a custom quick filter. I've attached some photos for reference.



Like 0

Like

4 comments

Hello Vishal,

 

Please clarify what task exactly you want to achieve. Do you need to get the filter itself?

Hey ,Oleg Drobina,

While entering the value in quick filter, dropdown values need to be filter based on first letter. 

For ex: if i enter 5 , it should show the values start with 5. 





thanks,

Vishal

 

vishal,

 

Understood, thank you!

 

As an option you can change the value in the StringColumnSearchComparisonType system setting to 0 and relogin to the app. In this case the filtration will be performed using the "Starts with" option. There is no inbuilt comparisonType property in the component metadata and the system setting is applied to all filters in the system (in this case if you need to use the "contains" option there should either an advanced filter used or use comparison with the % symbol "like '%5%')

Thank you, Oleg Drobina.

 

Show all comments

Cheers to all.

I'm developing my custom UI component in Angular and I need to get some data from Creatio database inside of my component. I discovered there is EntitySchemaQuery class in Creatio's sdk, so I decided to use it, but I'm stuck when I need to retreive data with that ESQ as I didn't find method for that. In classic ESQ there was getEntityCollection method for that. Could you please suggest how do I retrieve data from the database? Either using ESQ or other class, but user's authorization matters.

Here is the code of component.

import { Component, OnInit, Input, Output, 
        ViewEncapsulation, EventEmitter, SimpleChanges  } from '@angular/core';
import { CrtViewElement, CrtInput, CrtOutput, EntitySchemaQuery,
          ComparisonType,  AggregationType, AggregationEvalType, isGuid} from '@creatio-devkit/common';
 
@Component({
  selector: 'usr-input',
  templateUrl: './input.component.html',
  styleUrls: ['./input.component.scss'],
  encapsulation: ViewEncapsulation.ShadowDom
})
/* Add the CrtViewElement decorator to the InputComponent component. */
@CrtViewElement({
  selector: 'usr-input',
  type: 'usr.Input'
})
export class InputComponent implements OnInit {
  constructor() {}
 
  @Input("recordId")
  @CrtInput()
  /* The input recordId. */
  public recordId!: string;
 
  /* Add decorators to the EventEmitter<string>() event. */
  @Output()
  @CrtOutput()
  /* Track input value changes. */
  public valueChange = new EventEmitter<string>();
 
  ngOnInit(): void {
  }
 
 
  ngOnChanges(changes: SimpleChanges) {
    console.log(changes);
 
    if (isGuid(changes["recordId"]?.currentValue)) {
      let esq = new EntitySchemaQuery("ClvObject");
      esq.addAggregationFunctionColumn("Id", AggregationType.Count, "AppCount", AggregationEvalType.All);
      esq.filters.addSchemaColumnFilterWithParameter(ComparisonType.Equal, "ClvProject", this.recordId, "currentFilter");
 
      let record = esq.getMetadata();
      console.log(record);
    }
  }
}

 

Like 2

Like

3 comments

The EntitySchemaQuery classes in the devkit don't do anything, at least not how it is exposed. The ESQ classes require an executor class that actually *runs* the query and provides the connection. We don't have access to this, the executor that runs the ESQ is not part of the devkit sdk. This is intentional/by design since they want us to use the new Model classes instead. This better anyways, the Model class is far easier and more intuitive IMO.

The intended way to get data now is the Model class, which is in the devkit sdk. Here's some articles on the topic: 

Model Query Using Filters: https://customerfx.com/article/querying-data-using-filter-conditions-vi…

Model Query for a Single Record Given it's Id: https://customerfx.com/article/retrieving-a-record-via-the-model-class-…

Also, the model class does inserts/updates/deletes:

Inserting a Record: https://customerfx.com/article/inserting-a-record-from-client-side-code…

Updating a Record: https://customerfx.com/article/updating-a-record-from-client-side-code-…

Deleting a Record: https://customerfx.com/article/deleting-a-record-from-client-side-code-…

Copying a Record: https://customerfx.com/article/copying-a-record-from-client-side-code-u…

You can also use the Model class to get an object's schema:

Get Object Schema: https://customerfx.com/article/getting-an-object-schema-using-the-model…

Ryan

Hi, Ryan. Thanks for quick reply.

Maybe you could suggest how do I need to prepare aggregate columns for the query using Model class? I tried it as described below

  async ngOnChanges(changes: SimpleChanges) {
    console.log(changes);
 
    if (isGuid(changes["recordId"]?.currentValue)) {
      const dataModel = await Model.create("ClvObject");
      const filters = new FilterGroup();
      filters.addSchemaColumnFilterWithParameter(ComparisonType.Equal, "ClvProject", this.recordId, "currentFilter");
      const records = await dataModel.load({
//        attributes: ["Id", "ClvName", "ClvType", "ClvProject.ClvCommissioning"],
        attributes: [{ 
          aggregationConfig: {
            aggregationFunction: AggregationFunction.Count,
          },
          type: "aggregation",
          path: "Id",
          name: "AppCount",
          caption: "AppCountCaption",
          dataValueType: DataValueType.Integer
        }],
        parameters: [{
            type: ModelParameterType.Filter,
            value: filters
        }]
      });
      console.log(records);
 
    }
  }

But instead of getting one record with one column "AppCount" containig 2, I get two records each containg "Id" and "AppCount" 

Ok< I found out the way. Looks like aggregationConfig isn't yet working well and functionConfig should be used instead. Here is working exampe.

  async ngOnChanges(changes: SimpleChanges) {
    console.log(changes);
 
    if (isGuid(changes["recordId"]?.currentValue)) {
 
      const dataModel = await Model.create("ClvObject");
      const filters = new FilterGroup();
      filters.addSchemaColumnFilterWithParameter(ComparisonType.Equal, "ClvProject", this.recordId, "currentFilter");
      const records = await dataModel.load({
//        attributes: ["Id", "ClvName", "ClvType", "ClvProject.ClvCommissioning"],
        attributes: [
          { 
            type: "function",
            path: "Id",
            name: "AppCount",
            caption: "AppCountCaption",
            dataValueType: DataValueType.Integer,
            functionConfig: {
              aggregation: AggregationFunction.Count,
              type: "aggregation",
              aggregationEval: "all",
            }
          }],
          parameters: [{
              type: ModelParameterType.Filter,
              value: filters
          }
        ]
      });
      console.log(records);
 
    }
  }

And result

Show all comments

How do you add a dashboard page as a section in Freedom UI? I have an existing dashboard page which I want users to be able to access as though it were its own section, but I can't add the existing page to the workplace as it doesn't exist in the lookup window. I had a look at creating a new section in the application hub, but this will either create a new entity or have to be based over an existing entity, but this dashboard isn't based over any one particular entity and presumably doing this would create a new Section page which I didn't want. Any info on how to turn an existing page into a Section in Freedom UI?

Like 1

Like

4 comments
Best reply

Hi Pavlo, Essentially I want to create a standalone section page, so one that isn't tied to a specific entity or have to be created using the section template in the application hub.

Yes, using Freedom UI exclusively.

And the page I have created is inherited from the Homepage exactly. Is it possible to register this page as a section page?

Hi Harvey!

Please confirm, am I understanding correctly that you want to replace the section ListPage with your own page containing dashboards?

Is your dashboard page implemented in FreedomUI?

Which page does this page inherit from? Is it the Homepage?

Hi Pavlo, Essentially I want to create a standalone section page, so one that isn't tied to a specific entity or have to be created using the section template in the application hub.

Yes, using Freedom UI exclusively.

And the page I have created is inherited from the Homepage exactly. Is it possible to register this page as a section page?

Hi,

 

In general, there isn't a built-in feature for this. However, for such usage, we have the option to set a Homepage for the workplace. You can set this page instead of the current one.

 

But if you need two of your dashboard pages to be on the same workplace and displayed as a section, you can create a new section in the Freedom UI and replace its SectionSchemaUId with the UId of your dashboard page schema.



update "SysModule" set "SectionSchemaUId" = 'UId of dashboard schema module' where "Id" =  'Id of the section you want to open with the dashboard'

 

For example, I successfully set the SalesEnterpriseHomePage to open from the test section.



Hope this helps!

Thanks Pavlo, we already have a page being used as the Home page of the workplace the additional dashboard needs to reside in, so we had to do the database editing you suggested to get it to work, which it now does - thank you! This would be a very useful option to be able to do without custom SQL, no code being the aim of Creatio config going forward!

Show all comments

How can you set the default values created for an Activity when clicking on the Calendar in Freedom UI? I can't see anything in the OOTB code for calendar setup that would pass default values into the calendar activity creation process, but presume there must be some JSON parameters that could be set to specify things like the Activity Type/Category for example. Any help appreciated.

Like 3

Like

3 comments

Hello,

Unfortunately, this logic is hardcoded and cannot be changed at the moment. We have raised an improvement for the development team to make it possible to configure the default Category for this element in future releases.

Thank you for reaching out!

Thanks Pavlo, so no properties in the JSON can be set for this currently at all then? And no overriding of any of the schema handlers would enable setting them either? We currently have a fair amount of handler code, so wouldn't be too worried about adding some more in for now until this is possible in no code.

Unfortunately, it is not possible to change this logic for this scheme at the moment, even using such handlers.

Show all comments

Hi 

Is there any way to get all  the code column names in an object  in C#.

 

Regards

Rakshith Dheer

Like 0

Like

1 comments

Hello,

 

There is no direct method to do that, but here are a couple of options that may help:

 

1) When opening an object in the designer this service is called (via POST request):

 

https://creatioAppURL/0/ServiceModel/EntitySchemaDesignerService.svc/Ge…

 

to get the content of the object (metadata). The body for this request is the following:

 

{"schemaUId":"5479e4d7-510e-4b18-9242-e2b3125ab786","useFullHierarchy":false}

 

5479e4d7-510e-4b18-9242-e2b3125ab786 should be replaced with the UId of the object you need. Received JSON string can be then parsed to get the list of columns of the object.

 

2) You can also create a simple ESQ, use the AddAllSchemaColumns method and then retrieve the list of columns from the Columns property of the ESQ instance you created.

Show all comments

Hi all,



i read about using installment plan template in Order page from sales tools documentation. i use crm bundles demo in freedom ui for the environment. i found the pre template lookup but can't find the selection/dropdown to use it in "installment plan" detail. anybody know how to use this pre template in order form page (installment plan detail)?

Like 1

Like

1 comments
Best reply

Hello,

 

We have declined to incorporate this functionality within the Order and Contract Management application. The utilization of this detail within the application is accompanied by existing logic, and as of now, there are no plans to integrate it.

 

However, I will register such idea.

Hello,

 

We have declined to incorporate this functionality within the Order and Contract Management application. The utilization of this detail within the application is accompanied by existing logic, and as of now, there are no plans to integrate it.

 

However, I will register such idea.

Show all comments

Hello community,



I'm trying to apply dynamic filter for printables, my requirement is i am filtering the detail based on a quick filter(date) and when data's are filtered i want to generate a printable for that filtered data in the detail, now it is generating printable for all the data in the detail not taking the quick filter into account. Is there any way to achieve this?

 

Best regards,

Mahalaxmi Ganesan

Like 0

Like

1 comments

Hello, 

Thank you for reaching out with your question. I understand that you're looking for a way to apply dynamic filtering, but unfortunately, there is no built-in functionality for this specific feature. 

 

However, as a workaround, you can apply filtration for the table configured in the report setup. This allows you to customize the data that appears in the printable report according to specific criteria. While it may not offer the same level of flexibility as dynamic filtering, it can still help you achieve your desired outcome to some extent. 

 

For more detailed instructions on setting up reports please refer to the following link: 

https://academy.creatio.com/docs/8.x/no-code-customization/8.0/customiz…

Show all comments