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 all,

I have a customer need when opening a case the user has to choose which is the next status for going on.

I followed this article: https://customerfx.com/article/opening-a-record-for-edit-in-a-specific-…

 

I implemented successfuly on case record opening the popup for choosing the next status when status is new or reopened, .... 

 

It is working fine for opening first record but when closing the record and opening an other record then having an issue on opening the record the variable are not set. 

 

When doing a full refresh in the browser then the record is opening correctly. Do I need to invoke any destroy method after the popup ?

Here is the code of the handler:

          {
          request: "crt.HandleViewModelResumeRequest",
            handler: async (request, next) => {
              const handlerChain = sdk.HandlerChainService.instance;
              const recId = await request.$context.Id;
              const statusStr = await request.$context.PDS_Status_47jug57;
              
              const dspStatus = statusStr.displayValue;
                
                if(dspStatus=="New" || dspStatus=="Reopened"||dspStatus=="In progress" || dspStatus=="Waiting for response"){
                 await handlerChain.process({
                      type: "crt.OpenPageRequest",
                      $context: request.$context,
                      scopes: [...request.scopes],
                      schemaName: "s4aCaseStatus_ModalPage",
                        modelInitConfigs: [
                            {
                                action: "edit",
                                recordId: recId
                            }
                        ]
                    }
              );
             }
              
              return next?.handle(request);
            }
           }

 

Thanks in advance

Like 2

Like

2 comments

There are currently issues with reading/setting values in the HandleViewModelResumeRequest. For a workaround, try wrapping things in a setTimeout to delay it slightly. 

setTimeout(async () => {
	// do stuff here
	const statusStr = await request.$context.PDS_Status_47jug57;
	// etc
}, 300);

Hopefully we see this fixed/changed soon, it's a horrible hack :) See more here: https://community.creatio.com/questions/813-or-812-breaks-page-param-se…

Ryan

Thanks Ryan the fix workied. Hoping this bug is getting corrected soon.

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
Question

Hi 

 

we need to include some custom functionality to MessageComposer Componenet

The "form" field should be default equal to the contact that open the record

and the "To" field" need to be filtered by another setting related to the record data

 

Is there any possible that we can acheive this ?

 

Regards

Rakshith Dheer

Like 0

Like

3 comments

Hello,

We have reviewed your request and currently, it is not possible to customize the Message Composer with the basic tools in versions prior to 8.1.3. 

Starting from version 8.1.3, customization may be possible with development efforts.
 

Best regards,
Ivan

Ivan Savenko,

I want to length of the "To" Field of message Composer as "From" Field, Is it possible to do it? How?

 

 

Regards

Rakshith Dheer

Rakshith Dheer Reddy,

 

Hi,

 

At this time, this functionality is not yet available. However, our development team is aware of its importance and is actively working on implementing it.

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

Hi Community,

Can you provide a code example for the following scenario:

When a record to a detail is added, make a field in the Parent Page visible.

Example

When a record is created in Detail 'Opportunity Team' make the Description field (of Opportunity_Form_Page) visible

Regards

Sasor

Like 0

Like

2 comments
Best reply

Hey,
So you can  fetch the count of records under the detail object through code.If the count is greater than 0 then you can make it visibile.
EG below:

for the visibilty logic refer - https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…


 

Hi Community,

Any update regarding scenario?

Sasori

Hey,
So you can  fetch the count of records under the detail object through code.If the count is greater than 0 then you can make it visibile.
EG below:

for the visibilty logic refer - https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…


 

Show all comments

You need to create a custom detail generator(look at the example in Terrasoft.FileAndLinksEmbeddedDetailGenerator)

After that, create schema and add to manifest:

Ext.define("Terrasoft.configuration.CustomEmbeddedDetailGenerator", {
    extend: "Terrasoft.EmbeddedDetailGenerator",


    generateItem: function() {
        var config = this.callParent(arguments);

        var cardGenerator = this.getCardGenerator();

        var isEdit = cardGenerator.isEdit();
        if (isEdit) {
            config.xtype = "my_embeddeddetailitem";
        }
        return config;
    }

});

Create detail component with button 

Ext.define("Terrasoft.configuration.MyEditEmbeddedDetailItem", {
  extend: "Terrasoft.controls.EditEmbeddedDetailItem",
  xtype: "my_embeddeddetailitem",
  initialize: function () {
    this.myButton = Ext.create("Ext.Button", {
        text: ""
    });
    this.myButton.on("tap", this.onMyButtonTap, this);
    this.element.appendChild(this.myButton.element);
   this.callParent(arguments);
  },
  onMyButtonTap: function() {
    Terrasoft.Geolocation.getCurrentCoordinates({
        success: function(latitude, longitude, locationObj) {
        
        },
        scope: this
    });
  }
}

In RecordPageSettings metadata set generator xclass for detail
{
    "operation": "insert",
    "name": "AccountAddressDetail",
    "values": {
        "generator": {
            "xclass": "Terrasoft.configuration.CustomEmbeddedDetailGenerator"
        },
        
    },
    "parentName": "settings",
    "propertyName": "columnSets",
    "index": 3
}
 

Like 0

Like

0 comments
Show all comments

Hello,

 

I have a Freedom UI Page with a city field filter to show only US cities. If the user starts typing a city that belongs to more than 1 state, the user does not have a way of choosing the right one, without using the search icon where, by default we have the state shown on the search results. 

 

Ideally, we just want to display the state on the search results and not on the city field itself on the page, as we do have another field showing the State for the city selected.

 

Thanks,

Jose

 

 

 

Like 2

Like

2 comments

yes, adding the view for more columns in the dropdown field would be great !

Hello,
We created a dedicated task for our R&D team in order for them to review the possibility of adding this logic to a dropdown list. For now, you can use "Selection window"

Show all comments

Hi Community,

Can you provide a code snippet of how we can capture the delete event generated from an Editable List, from the parent Page?

Example:

 

We want to catch in the Opportunities_FormPage -> the deletion of a record in Opportunity Team Detail.

Regards,

Sasor

Like 0

Like

3 comments

Hi Community,

Any update regarding this scenario?

Sasori

Sasori,

You can fetch the event of deletion in a business process. Then you can do actions and if your object opportunity has live update set then the updates will appear as soon the business process has run.

 

Other option would be to add your own action in the list and handle all necessary changes in the page.

 

Franck

Hello!

There is a crt.DeleteRecordsRequest, you can add a custom handler for this request (handlers in schema metadata).

This request is called when the user tries to delete records from the row menu and bulk actions menu.
But it is called before user confirmation (modal window), and rights checking.

There are such properties in the payload: 

dataSourceName - data source name of list, for which request is called;
filters - filters for records deletion(passed when records deleted by bulk actions panel)

recordIds - record ids which should be deleted (passed when record deleted by clicking row menu delete button)

Example:


handlers: /**SCHEMA_HANDLERS*/[{
            request: "crt.DeleteRecordsRequest",
            handler: async (request, next) => {
                const dataSourceName = request.dataSourceName;
                const filters = request.filters;
                const recordIds = request.recordIds ;


                console.log(dataSourceName, filters, recordIds );
                return next?.handle(request);
            }
}]/**SCHEMA_HANDLERS*/,

Show all comments

Hello,
I have some questions about lists in Creatio Freedom UI.

1. Is there any way to make a field read-only on a list while allowing it to be edited from the form page? I tried to use object-level business rules, but I couldn't disable the field only on the list. Fields are not available in the page-level business object on the list view.
2. Is it possible to add a custom validation for some fields on the list?
3. Is it possible to handle every field change, like on a form page? Some of my fields are being calculated live on the form page, using `crt.HandleViewModelAttributeChangeRequest`. I'd like to do the same on the list page or at least make those fields read-only on the list page.
4. I found a crt.SaveRecordsRequest request during debugging that allows me to review user changes before saving. But when I try to open a mini page using request.$context.executeRequest, nothing happens.
5/ Do you know of any more helpful requests related to lists? I found some more, like `crt.SaveDataRequest`, but it seems to have a restricted scope, so I can't add my own handler for it.
 

Like 1

Like

2 comments

Hey,
1.Yes you can deselect the inline editing of records option in the designer page for the detail.
2.Yes it is possible through code - but can you pls elaborate on what you mean by custom?
3.No you can't do the live calculation on the list page

Hello Eryk,
Thank you for your question!

Regarding your forth question. The following code should work
handler implementation code
Note that you also need to add @creatio-devkit/common library to your module dependencies as well as pass parameter it's function.
import deps and pass parameter to function
You can find some examples of how to open a page in custom handler here.

Regarding you fifth question. Could you please clarify and provide example on how you are implementing your logic? 
 

Show all comments