It is possible to remove 2 decimal after comma?

Like 0

Like

2 comments

Hello, 

 

It's not possible to remove zeros after the decimal point without changing the type of the column in the DB. 

If there is some data stored in the column - we strongly don't recommend changing the data type of this column since data can be lost.

But if it is absolutely new column - you can change the data type.

 

Best regards,

Anastasiia

Anastasiia Zhuravel,

Okay thank you 

Show all comments

Hello Community, 

 

I wanted to perform two actions on click of a button

1. Saves the fields in the tab page 

2. Navigate to next tab 

Right now we are using the crt.SaveRecordRequest. This only saves the page. 

 

Any suggestions is really helpful 

 

Thanks

Gargeyi.G

Like 0

Like

4 comments

Hello,

This article will show you how to navigate to a new page on a Freedom UI page: 

https://customerfx.com/article/navigating-to-a-page-via-code-in-a-creat…

If you want to open an edit page for a record, or an add page, this article outlines how to do that: 

https://customerfx.com/article/opening-an-edit-page-to-add-or-edit-a-re…

Ryan

Also, as far as having the button trigger both - there are two routes you can take. 

Route 1 - If you'd always go to this other page after saving, you could just do that when the save request is triggered. This article shows how to listen for when the page is saved, then you could navigate to the other page from there: https://customerfx.com/article/adding-code-to-the-save-event-of-a-creat…

Route 2 - If you're only wanting to save, then go to this other page, when your own button is clicked, and not for all saves, then you can wire up your own handler for your button. This article shows how to to that: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o… In the handler, you'd save the page, then navigate to the other page. If you go this route (creating a custom request for your button). It would look like this:

{
	request: "cfx.clickMeButtonClicked",
	handler: async (request, next) => {
		// make sure you've added the "@creatio-devkit/common" as mentioned in the articles			
		const handlerChain = sdk.HandlerChainService.instance;
 
		// first save the record
		await handlerChain.process({
			type: "crt.SaveRecordRequest",
			$context: request.$context
		});
 
		// now navigate to the other page, this navigates to the orders section
		await handlerChain.process({
			type: "crt.OpenPageRequest",
			schemaName: "OrderSectionV2",
			$context: request.$context
		});
 
		return await next?.handle(request);
	}
}

Ryan

Ryan Farley,

Please note that it's best to pass context to each handlerChain.process call. So, in your example, the second call should be:

		// now navigate to the other page, this navigates to the orders section
		await handlerChain.process({
			type: "crt.OpenPageRequest",
			schemaName: "OrderSectionV2",
			$context: request.$context
		});

 

Oleksandr Khardikov,

Thanks for that. I've updated the code in my reply for completeness and also the articles on my website.

Ryan

Show all comments

Hello Community,

 

I wanted to validate Start date and enddate. For start date I will use current date to validate. But to validate EndDate I wanted the value of Startdate field. 

I want to know how to read the startdate attribute value in the end date validator. 

I am able to get the value of the attribute in handler, But i could not get value in the validators

"usr.usrenddatevalidator":{

                "validator": function(config){

                    return function(control){

                        var date1 = new Date();

                        var date2 = new Date(control.value);

                        var date3 = startdateAttributeValue;

                        return (date2 < date1 || date3 >= date2) ?  {"usr.usrenddatevalidator": { message: config.message }} : null;

                    };

                },

                "params":[

                    {"name":"message"}

                   ],

                "async":false

            },

Thanks in Advance 

Gargeyi.G

 

Like 1

Like

3 comments

Hello Gargeyi,

 

Unfortunately there is no way to get data from other controls on the page in the context of validator execution triggered on some of the controls on the page. I've asked our core R&D team to add the possibility to operate with other controls values in terms of validator execution. Thank you for helping us in making the app better!

Oleg Drobina,

Thanks Oleg

 

I have the same issue, I saw this issue was from more than one year, I'm working on Creatio v8.1.3. Is still not possible to resolve what Gargeyi Gnanasekhar ask?

 

In my case I need to validate just when some conditions met regarding some data in the page, for example, the type of document is type1 or type2 or type 3.

 

Is there any workaround to accomplish this need?

 

Thanks in advance

Julio.Falcon_Nodos, hello!

I've checked the problem status, and it's in the process of being resolved. Follow the release updates to be the first to see the news.

Show all comments