In classic UI we used to override/extend the ActivityDashboardItemViewModel in order to handle the "Complete" activity button click.

 

How can we do this using FreedomUI?

 

Thanks!

Like 3

Like

2 comments

Hello,

 

I'm afraid we don't have any possibility to contol this behavior using page handlers. But if anyone has an example to share please share it. I've registered a task for our R&D team to make it possible to control it using no-code tools.

Oleg Drobina,

it would be great to be able to intercept it via request handlers in code too. Overriding the behaviour is essential to a lot of our customisation for clients.

Show all comments

Hello, 

 

Do you know how to mask first 12 digits of a Credit Card in Freedom UI Creatio?

 

Example :-

Credit Card Number :- 2345-2121-1225-8909

After masking I want to see as ****-****-****-8909 in Freedom UI.

 

Thanks,

Like 1

Like

1 comments

You can try using the password input which will mask the entire text as ****. This control doens't appear in the toolbox, so to add it, you could add an input, then in the code change "type": "crt.Input" to "type": "crt.PasswordInput". You can see an example of this control in the page SysUserProfilePage (user profile page)

 

If you need it more how you described, showing the last 4 digits, you would need to implement your own custom control. You can see details for that here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Ryan

Show all comments

Hi Guys,

 

How to compare two dates in Freedom UI and display warning if first date is greater than second date in Freedom UI.

 

Thank you!

Like 1

Like

2 comments

You can use this example for date validation in the page handler code

    //----------- DATE VALIDATION --------//

        request: "crt.HandleViewModelAttributeChangeRequest",

        handler: async (request, next) => {

        // ------------Get the selected date values--------//

        var dateFrom = await request.$context.DateTimeAttribute_6jtq65k;

        var dateTo = await request.$context.DateTimeAttribute_vg9eydm;

        // Check if dateFrom and dateTo values are valid

        if (!dateFrom || !dateTo) {

            return;

        }

        //------Convert the date values to JavaScript Date objects---------//

        var jsDateFrom = new Date(dateFrom);

        var jsDateTo = new Date(dateTo);

        //---------Check the date values and display an error message-----------//

        if (jsDateTo < jsDateFrom) {

            var errorMessage = "Please choose a different 'dateTo' value. It should be greater than 'dateFrom'.";

            Terrasoft.utils.showMessage({

                caption: errorMessage,

                message: errorMessage,

                buttons: ["ok"],

                defaultButton: 0,

                style: Terrasoft.MessageBoxStyles.RED

            });

            request.$context.DateTimeAttribute_vg9eydm = null;

            return;

        }

Abhishek,

Thanks Abhishek, Instead of "handler" is there any way  to use "validators"? 

Show all comments

Hello Everyone,

 

How to convert input text value to ***** in Freedom UI.

 

Thanks.

Like 0

Like

1 comments

You can try using the password input which will mask the entire text as ****. This control doesn't appear in the toolbox, so to add it, you could add an input, then in the code change "type": "crt.Input" to "type": "crt.PasswordInput". You can see an example of this control in the page SysUserProfilePage (user profile page)

Ryan

Show all comments

Hello, 

 

I would like to set an upper limit on the size of an image that gets sent in an email. The image being sent is a variable in a form using the [#ImageName#] syntax. 

 

I have tried styling the element in div and img tags, but I think that this variable syntax does not respect styles.  

 

How can I style an image in an email template? 

 

Thanks!

Like 0

Like

1 comments

Hello,

 

Unfortunately, the logic of inserting an image through a macro into a letter template is not implemented in Creatio.

I am broadcasting your wish to the development team to consider the possibility of adding similar logic in future versions.

Show all comments

Hello All,

Can Anyone knows, on clicking on tab open popup window in Freedom UI ?

Like 0

Like

1 comments

Hello,

 

Could you please describe your business goal in more details, with screenshots if possible?

Show all comments

Hi all, 

I'm seeing several examples of how to handle the click event of a button in FreedomUI.

 

Was wondering which other events can be handled in the controls. I'm interested in the lostFocus or blur event of an input field. Is there any way to handle that event?

Where I can get documentation about all control events that can be handled?

 

I also saw some examples about handling any change of any viewmodel property. I-d like to handle view events for specific controls.



Thanks!

Like 0

Like

3 comments

Hello Andres!

 

Unfortunately, there are no specific event handlers for the fields.

 

But you can create your own handler for the blur event using the "handlers" schema section of the Freedom UI page or a remote module.

This request should be bound to the “blurred” property of the input field in the “viewConfigDiff”:

 

 

Also, the list of the generic query handlers is available here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/client-schema-freedomui/references/handlers

 

Example of the invoking the query handler - https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/platform-customization/freedom-ui/page-customization-basics/examples/change-where-the-query-handler-is-invoked

 

 

Best regards,

Natalia

 

Thanks! Actually the "blurred" property is what I was looking for.

Is there any documentation in which I can see all the properties that can be bound for a field, in the same way we can bind blurred?



Thanks!

 

Andres Arrigonni,

Did you by any change got the documentation of all the events for fields? 

I just tried Blurred in a RichTextBox and it's not working.

Show all comments

Is it possible to set up useful number truncation in Creatio for Measure/KPI elements in Freedom UI? OOTB, if a number being shown in the Measure component is too long, it just gets cut off and ellipses put at the end to indicate it's not all showing, but this means the user cannot tell how big the number is at all! It could have 3, 6, 9 or more extra zeroes hidden in the ellipsis. e.g. the following could be showing 191 million, 191 billion, 191 trillion etc:

 

Ideally it would be possible to set it up so that you can choose to have automatic truncation using abbreviations like 10M or 20K if the number is too long, but it would also be nice if we could specify in the number formatting that the number should always be shown in thousands, millions etc - possibly something like specifying "{0k}" in the number format for always showing the number in thousands. Don't know how possible any of this is today or would require changes by Creatio, but any advice appreciated. Currently using Creatio 8.1.0

Like 1

Like

1 comments

Yes this is getting pretty frustrating among metrics and graphs alike for a couple years now, not to be able to set to K or M etc...

Show all comments

I'm overriding the HandleViewModelAttributeChangeRequest request handler in client code, and want to set a hidden parameter used for showing/hiding fields and making them required/not required in this code when the page first loads, but I don't want this change to be detected by Creatio as a save-able change so that it thinks there is a change to be saved when closing the page. Is it possible to do this? I've tried setting the "silent" property of the request to true in the HandleViewModelAttributeChangeRequest handler and also tried setting the "IsChanged" property of the request.$context to false after changing the attribute value, but neither of these seems to prevent the "You have unsaved changes that will be lost. Continue?" dialog from showing when closing the page.

 

I'm currently using Creatio 8.1.0

Like 1

Like

7 comments

Can you please provide some direct example of what you are trying to achieve since unfortunately it's not obvious to us what is performed on the page at the moment, what is the expected result and what is the actual result? Maybe some steps to reproduce it in the local application (like the following:

 

1) Add column A

2) Add attribute B

3) Connect B to A in the following manner

4) Go to the page where the column and the attribute were added

5) Do "this"

6) Expected result is C

7) Actual result is D

 

) .

 

Thank you!

Oleg Drobina,

Basically all I want is to be able to set the value of an attribute in code without triggering the "You have unsaved changes that will be lost. Continue?" message when you leave the page. Is this possible?

Harvey Adcock,

 

I tried to reproduce the issue, but changing the value of the virtual attributes (like attributes created to control the visibility of the field) by itself does not cause this dialog to appear. 

Please ensure that no other changes need to be saved on the page. Or provide us with additional information describing the exact steps to reproduce the issue.

 

Best regards,

Natalia

Natalia Kalynovska,

 

Sorry, I was probably not detailed enough in my abbreviated version - the changes are actually to an attribute that is based over a real column on the entity, so not a virtual attribute. Is there any way to modify such a field in code without triggering the dialog?

Hello Harvey,

To change the field without triggering the dialog, you should save it at once.

It could be implemented by adding the following code to the HandleViewModelAttributeChangeRequest:

if (request.attributeName === “[Name of the attribute]”) {

const saveResult = await this.handlerChain.handlerChain$.process({

           type: "crt.SaveRecordRequest",

           preventCardClose: true,

           $context: request.$context

    });

}

Please pay attention that too many saving requests may decrease performance.

 

Another way is to save the necessary changed values to a virtual attribute first, and then extract all of them (set attributes values) and initiate SaveRecordRequest while closing the page (in crt. ClosePageRequest). This approach has some disadvantages:

  1. you need to manually adjust the visibility  of “SaveButton” and “CloseButton“ by adding the corresponding merge operations to “viewConfigDiff” of ListPage and FormPage modules (see example - https://community.creatio.com/questions/how-remove-closesave-button-custom-section);
  2. data would be saved only on a close/back button click.

And again – you should provide some conditions in order not to store too many changes.

 

Additionally, starting from the 8.1.1 Creatio version, the dialog may be prevented by adding to handlers the overridden “crt.CanDiscardUnsavedDataRequest” handler:

{request: "crt.CanDiscardUnsavedDataRequest", handler: async (request, next) => {return true;}},

(see https://community.creatio.com/questions/possible-suppress-message-upon-canceling-freedom-ui-mini-page).

However, it still requires manually adjusting the button's visibility and providing proper data saving.

 

Best regards, 

Natalia

Thanks Natalia, it would be really useful to have the functionality for making silent changes from code that existed in Classic UI added back into Freedom UI - see this post for what was possible in Classic: https://community.creatio.com/questions/change-value-field-without-firing-changed-events

 

The utility can be in setting fields from code when a create record page loads based on more complicated conditions than you can define in business rules/by other means, but not causing the user additional clicks to cancel or think that they might lose work.

Possibly some usage of this guide might be able to fulfil the ability to discard such data, though it would probably be quite tedious to implement in this scenario: https://customerfx.com/article/suppressing-the-unsaved-data-prompt-when-canceling-a-creatio-freedom-ui-modal-dialog/

Show all comments

Hello Everyone, 



We have a scenario where I have created two new sections in Freedom UI (Opportunity and Order). Everything is working fine but when we click on the Opportunity in Order page it opens the Classic UI Opportunity Page instead of the newly created Freedom UI Page. Can anyone help me out with this?

Like 0

Like

1 comments

Hello,



In this situation, please check if you have the "UseNewShell" system setting enabled. Also in the "Object-specific form page interface in the Freedom and Classic UI shell" lookup, check that Opportunity is specified in the Freedom UI pages. The necessary instructions, I send below:

1. Turn on Freedom UI

2. Manage form pages in Freedom UI

Show all comments