Hi

 

Somebody know how determine, when working with a record in a Freedom UI page if it corresponds to a new record (new/copy)?

 

Thanks in advance

 

Regards

 

Julio Falcón

Like 0

Like

5 comments

Hello Julio,

const cardState = await request.$context.CardState;
if (cardState == "add" || cardState == "copy") {
     // do something here
}

Ryan

Ryan Farley,

Thanks Ryan, where did you find/get this kind of information?

Ryan Farley,

Ryan,

 

In which kind of handler request I must introduce the code? I tried in crt.OpenPageRequest, but nothing happens. The code I'm using:

 

handlers: /**SCHEMA_HANDLERS*/[ // NdosEntity_4ad7b54DS.NdosPeriodicidadMP
	{ 
		request: "crt.OpenPageRequest",
		handler: async (request, next) => {
			const okBtn = {
				key: "OK",
				config: {
					color: "accent",
					caption: "OK"
				}
			};
 
			const cancelBtn = {
				key: "CANCEL",
				config: {
					color: "primary",
					caption: "Salir"
				}
			};
 
			// Nuevo o Copia
			const cardState = await request.$context.CardState;
 
			// Mensaje...
			const result = await request.$context.executeRequest({
				type: "crt.ShowDialogRequest",
				$context: request.$context,
				dialogConfig: {
					data: {
						message: ( cardState == "add" || cardState == "copy" ) ? "New: Este es un nuevo registro" : "Existing one: Este registro ya existe" ,
						actions: [ okBtn, cancelBtn ]
					}
				}
			});
 
			if (result === "OK") {
				// Clica en OK
 
			}
 
			/* Siguiente handler, retorna resultado */
			return next?.handle( request );
 
		},	
	},
]

Julio.Falcon_Nodos,

You would add this in the page you’re opening, not in the code that opens the page. What is the intent you’re trying to produce? I assume that in a page you’re wanting to know if the page is in add mode vs edit. Correct? To accomplish this you’d add something such as a crt.HandleViewModelResumeRequest on the page and check the cardstate there. 

Thanks Ryan, I'm also try using crt.HandleViewModelResumeRequest, but nothnig happens.

 

What I need is that when I open the page "Air Equipment/NdosPage_3ud8c3e" it can detect if I am working with a new record and do something. So it is in the code of this page, where I enter the commented code, compile, open an existing record and create a new one and the code entered does not execute/does not work in any situation.

 

If I add the code inside a crt.HandleViewModelAttributeChangeRequest, it works, but it stays 

in loop and to exit I have to go back in the browser.

 

I made a short video to show what I'm doing and where the code is in case it helps to understand, see at

https://share.vidyard.com/watch/NRBjhx3hjzCi9sZ2x5qsSK?

 

In Classic UI I've the onEntityInitialized method to execute when open the page, but in Freedom is very different

 

Thanks again

Julñio

Show all comments

I am looking for assistance with a challenge I am facing in the Freedom UI of Creatio regarding the display of decimal field values in a label.

The issue I am encountering is that when I try to display a decimal value in a label on the Freedom UI page, the value is not being comma-separated as expected. For example, if the decimal value is 23,586.06, the label only shows 23586.06 without the comma. Similarly, for the value 1,000.00, the label displays only 1000 instead of 1,000.00.

What I am aiming for is to have the decimal values displayed with commas for better readability. For instance, the value 23,586.06 should be displayed as 23.586.06, and 1,000.00 should appear as 1,000.00 in the label on the Freedom UI page.

I have tried several approaches to address this issue within the Freedom UI but have not been successful in achieving the desired result.

Like 0

Like

4 comments

Hello Satyam,

 

Could you please clarify how exactly you implemented the 'decimal number' in the label?

When you set the number in the attribute bound to the label you can use toLocaleString:

request.$context.MyAttribute = num.toLocaleString();

Ryan

.

Hello ,

 

Thanks for the response.
 

The below given code is how we are currently setting the value of the UsrAmount decimal field to be shown as a label caption.

{
                "operation": "insert",
                "name": "Label_td5mlo3",
                "values": {
                    "layoutConfig": {
                        "column": 1,
                        "row": 2,
                        "colSpan": 1,
                        "rowSpan": 1
                    },
                    "type": "crt.Label",
                    "caption": "$PDS_UsrAmount_7hu2ut1",
                    "labelType": "headline-1",
                    "labelThickness": "bold",
                    "labelEllipsis": false,
                    "labelColor": "#181818",
                    "labelBackgroundColor": "transparent",
                    "labelTextAlign": "center",
                    "visible": true
                },
                "parentName": "GridContainer_rpq3gxq",
                "propertyName": "items",
                "index": 1
            }

 

As a result, it picks the value from the decimal field and shows in the label as shown in the screenshot below:

 

I want to show the Label caption in the same format as that of the amount field. Also another thing that we have noticed is that when the amount is 1,000.00 , the caption shows 1000 instead of 1000.00. 

kindly help

Show all comments

Hi Community,

 

We have this business requirement where we need to add duplicated communication options. For example, we can have two records for the same phone number.

 

When we try to add the same number, we receive the following error:

 

How can we turn off this validation/constraint? 

 

Thank you in advance.

Best Regards,

Pedro Pinheiro

Like 0

Like

0 comments
Show all comments

Hi 

I am trying to use the crt.UploadFileRequest in the action menu on the click of 'Upload a file' as shown in the figure. But the functionality doesn't work as the upload function in the attachment detail. Is there any other we can use upload a file from clicking button in the action-menu. 

Like 0

Like

2 comments

Hello,

 

Please describe in detail how this detail was implemented so we could better understand the issue.

Mira Dmitruk,

 

We are basically trying to add the Upload File  funtionality to the Menu item (Upload File as shown above in the image). 

 

We created a attachment detail through the desinger page and gave the functionality shown in the image  (which is the upload functionality for upload button for the attachement detail ) below to the rowToolbarItems (menu item). But it dosen't work 

Show all comments

As the title says, we sometimes need to disable buttons while still showing them - something which was easy to do in Classic UI. Is there any way of doing so in Freedom UI? I can't see any examples in OOTB Freedom UI areas, anywhere that does have disabled buttons OOTB are in Classic UI sections (e.g. the "Finish session" button on the System User page on the Access Rules tab when no record is selected).

Like 0

Like

4 comments
Best reply

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Hi Harvey, 

Does it not work to bind an attribute to the enabled property of a button and set as true/false? I've not tried that, but I assume it would work? Have you already tried that?

Ryan

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Huh, not sure how I missed that, could've sworn I tried doing that! Thanks both.

As a note, the only way I could find to put some kind of hint/tooltip on the button when it's disabled is by using the "title" property, which gives you a standard browser tooltip display when hovering the mouse over the button. And binding that to an attribute that you change to be blank when the button is enabled.

Show all comments

Hi 

 

Can we add a button in a column for a  detail in Freedom UI. The Button should be in  place of the data in the column for each record.

Like 0

Like

1 comments
Best reply

It doesn't allow adding buttons in the list columns, as far as I am aware. However, you can add to the row actions menu (the three dot button menu on the left side of the list). See https://customerfx.com/article/adding-row-action-menu-items-to-a-creatio-freedom-ui-list/

Ryan

It doesn't allow adding buttons in the list columns, as far as I am aware. However, you can add to the row actions menu (the three dot button menu on the left side of the list). See https://customerfx.com/article/adding-row-action-menu-items-to-a-creatio-freedom-ui-list/

Ryan

Show all comments

Hi there - I'm trying to figure out where to put this schema in Creatio configuration to allow for a button in mobile.  I've found this article but it isn't clear how/where to apply this:

 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/mobile-development/customization/freedom-ui/customize-page/references/common-components

 

Thank you!

Like 0

Like

2 comments

Hi!

Please contact our support team at support@creatio.com and describe your situation to us. We will be happy to help you. 

Best regards,
Anton

Hello,

In this article, you can find the description of the page, on which the button component should be added.

Show all comments

In Freedom UI we have the possibility to setup the message composer to set a default sender : 

  • Use default mailbox
  • Use case source mailbox

The system is not generating the field from when composing a new email. Is this feature available ?

 

 

 

Anyone got this working ?

Like 1

Like

1 comments

Hi Frank!

The "From" field will be filled depending on the "Default sender" selected by you when replying to an email in the Conversation tab.


 However, if you are writing the first email in the thread without replying to the previous one, the "From" field will not be automatically filled if you have selected "Use case source mailbox". Instead, it will be filled with the value of the "Default mailbox" if this option has been selected.

I hope I have answered your questions!

Show all comments
Hi All,
 
I am trying to apply quick filter in the contact section under "All Email" Tab such that is should show all the mails related to the current user 
 
Below is the handler code:
 
	handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.LoadDataRequest",
		handler: async (request, next) => {
	/*if (request.dataSourceName === "ByOwnerQuickFilterInTimeline_ComboBox_List_DS") 
		{
		  const userId = Terrasoft.SysValue.CURRENT_USER.value;
		  console.log(userId);
		  //Create a filter to match the owner field with the current user's ID
			const filter = new sdk.FilterGroup();
			await filter.addExistsFilter("[SysAdminUnit:Contact:Id].Id");
		   //workaround for filters
			const newFilter = Object.assign({}, filter);
			newFilter.items = filter.items;
			request.parameters.push({
						type: "filter",
						value: newFilter
					    });
			console.log("testing");
			request.$context.attributes.ByOwnerQuickFilterInTimeline_Value[0] = [
 					 {
    				checkedState: true,
    				displayValue: "Lori Espinoza",
    				value: "ccb53f93-d5ab-4121-8598-63a8a694eeb"
  					}
					];
 
				console.log("Test");
				return await next?.handle(request);
			}
	}
		
Like 0

Like

1 comments

Hello,

 

Currently there is no tool to set the default filter in the Freedom UI Timeline component, but our R&D team has a task for implementing this functionality in one of the future application releases. Thank you for reporting this to us and helping us in making the app better!

Show all comments

Hi everyone,

in the OLD UI I used to create a separate module that stored all the constant values used in the code of the pages, such as a specific AccountTypeId or a SysAdminUnitId. I also used to add this module in the edit pages to access those values.

Now I need to do the same thing in the Freedom UI and I haven't figured out how to do it yet. I tried using the same approach by adding the Module in the SCHEMA DEPS and ARGS of the page definition, but I can't access the properties of the custom module.

Can anyone help me?
Let me know.

Thanks in advance.

BR,

 

Luca

Like 0

Like

1 comments
Best reply

I did additional tests and found that referencing the module in the SCHEMA DEPS and ARGS is correct, even though while debugging it's not possible to see the page constants "clearly". However, using "await" allows you to access to those values.

For example, like this:

var customerType = await UsrTestConfigurationEnum.AccountTypes.Customer;

I did additional tests and found that referencing the module in the SCHEMA DEPS and ARGS is correct, even though while debugging it's not possible to see the page constants "clearly". However, using "await" allows you to access to those values.

For example, like this:

var customerType = await UsrTestConfigurationEnum.AccountTypes.Customer;
Show all comments