Hi,

I am using Creatio 7.14. I have a custom detail with a Price field of Decimal datatype. I know that we can define precision to 1, 2, 3, 4 or 8 decimal places. Is there a way to set it to 5? Attached is the image for the current setup of the detail.

Instead of displaying as 0.00003000, I need to display as 0.00003. 

I was able to achieve it in Detail Edit page by adding the below attribute to the field in diff:

"controlConfig": {

                        decimalPrecision: 5

                    }

 

I need to achieve the same in Detail Grid as well. I followed the community articles to create a module from scratch to extend Terrasoft.Grid:

https://community.creatio.com/questions/hyperlink-fields

https://community.creatio.com/questions/substitutionreplacing-modules

https://community.creatio.com/questions/custom-detail-hyperlink-get-fil…

 

-------------------------------------

define("UsrConfigurationGrid", ["Terrasoft.Grid"], function() {

    Ext.define("Terrasoft.configuration.UsrConfigurationGrid", {

        extend: "Terrasoft.Grid",

        alternateClassName: "Terrasoft.UsrConfigurationGrid",

        // change methods here 

        formatCellContent: function(htmlConfig, data, column) {

            if(column==="UsrTrtPrice")

            {

                data.UsrTrtPrice = parseFloat(data.UsrTrtPrice).toFixed(5);

            }

            return this.callParent(arguments);

        }

            

    });

    

    return Terrasoft.UsrConfigurationGrid;

});

-------------------------------------

Is this the correct way to do it? How should I proceed from here? Do I need to add "UsrConfigurationGrid" as a dependency in Detail Grid Page as:

----------------------------------------------

define("O1SessionDetailGrid", ["ConfigurationGrid", "ConfigurationGridGenerator",

    "ConfigurationGridUtilities","ProcessModuleUtilities","UsrConfigurationGrid"], function(ProcessModuleUtilities) {

    return {.......

----------------------------------------------

Should I remove "ConfigurationGrid" which was added to make the grid editable? The above setting does not seem to be working as the detail is not getting displayed after adding "UsrConfigurationGrid".

I would appreciate if anyone could provide any thoughts on this.

 

File attachments
Like 0

Like

2 comments
Best reply

Hi,

 

There is an easier way to achieve a custom precision for the column: in the grid detail schema you need to override the getGridRowViewModelConfig method. For example I've created a replacing view model for the OrderProductDetailV2 and specified the following code there:

define("OrderProductDetailV2", ["MoneyModule", "css!OrderPageV2Styles", "css!SummaryModuleV2"], function(MoneyModule) {
	return {
		entitySchemaName: "OrderProduct",
		messages: {},
		attributes: {},
		methods: {
			getGridRowViewModelConfig: function(config) {
				var gridRowViewModelConfig = this.callParent(arguments);
				gridRowViewModelConfig.rowConfig.UsrDecForTests.precision=6;
				return gridRowViewModelConfig;
			}
		},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

In this case all the values in the precision for the "UsrDecForTests" decimal column (that is Decimal (0.00000001) data type) in the "Products" detail on the order page will be set to 6:

and

and

So you can try the following approach on your end.

 

Best regards,

Oscar

Hi,

 

There is an easier way to achieve a custom precision for the column: in the grid detail schema you need to override the getGridRowViewModelConfig method. For example I've created a replacing view model for the OrderProductDetailV2 and specified the following code there:

define("OrderProductDetailV2", ["MoneyModule", "css!OrderPageV2Styles", "css!SummaryModuleV2"], function(MoneyModule) {
	return {
		entitySchemaName: "OrderProduct",
		messages: {},
		attributes: {},
		methods: {
			getGridRowViewModelConfig: function(config) {
				var gridRowViewModelConfig = this.callParent(arguments);
				gridRowViewModelConfig.rowConfig.UsrDecForTests.precision=6;
				return gridRowViewModelConfig;
			}
		},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

In this case all the values in the precision for the "UsrDecForTests" decimal column (that is Decimal (0.00000001) data type) in the "Products" detail on the order page will be set to 6:

and

and

So you can try the following approach on your end.

 

Best regards,

Oscar

That's exactly what I needed. Thank you, Oscar!

Show all comments

Hello Community,

 

Is possible to extend numer of column on grid view ?

Eg. To display more than 24 coulmns on ProductSectionV2.  It could be development solution or any hint.

 

Regards,

Marcin Kott

Like 0

Like

3 comments

Dear Marcin,

 

As for now, there is no workaround to increase the number of columns in grid view. I recommend using the tile view. For this view, it`s possible to more flexibly adjust the number of displayed columns and their size.

 

Best regards,

Angela

Hi Angela,

 

Angela Reyes writes:

Dear Marcin,

As for now, there is no workaround to increase the number of columns in grid view. I recommend using the tile view. For this view, it`s possible to more flexibly adjust the number of displayed columns and their size.

Best regards,

Angela

MoreLess

1 page only 2 records (if you have more than 50 fields, 1 record in 1 page)

 

24 fields list view, cannot see any things - cannot remove field after add 24 fields in settings

Hope that Creatio improve horizon scroll for list view, and user can adjust wide column without open list setup page.

 

Regards,

Akira Nguyen

Hi,

 

Yes, You have a right but for this i have solution (even two or both of):

- in case of horizontal scrolling have a look how to achive this on grid

https://community.creatio.com/ideas/horizontal-view-section-and-detail

- in case of expand visibility of grid You may use add'on

https://marketplace.creatio.com/app/expandable-details-creatio

 

So only what i'm looking for is the possibility to increase list view column limitation.

 

Regards,

Marcin

Show all comments

How can I get bigger font for name in custom section.

Here is the pic of Contact section (in-buily) with Name shown in big fonts in tile view.

Now I have built my custom Contact section but with few changes. It is not replaced or inherited with actual Contact section.

Now in the section after removing caption of the field the font size of name is still small.

 

How can I get bigger font like in in-built/out of the box contact Section.

I want to apply it to other sections also. So there is no point to use out of the box Contact section by replacing object which already has big fonts.

Like 0

Like

3 comments

Hi Ramnath.

 

You can change the font size by adding a custom css style to the schema you need and in such a way override the system font-size. Please refer to this article on our community: https://community.bpmonline.com/questions/how-add-custom-style-control-page-based-condition

I recommend you change a font-size first for any page in the system to check if it looks fine as we do not guarantee that all objects, labels, and containers will be displayed correctly. 



Thank you.

Bohdan Zdor,

 

I have tried this before but I could only make it work on the page of arecord. I need to edit the page where all the records are shown. I could not find the module which has the code for the list of records.

 

Ramnath

RAMNATH SHARMA,

 

 

Unfortunately, there is no option to change the section list font size in the current version of the system. I have registered your suggestion, though. It was passed to our R&D team to be considered for further releases.

 

Thank you. 

Show all comments

For instance, I have a column Account.UsrFlagTemp.

I don't need it anymore and I want to delete it.

But I want to search through all the processes to find out if any process still uses it.

Is there a way to do it automatically?

This is the cloud version.

Like 0

Like

1 comments

Hello Yuriy,

 

We do not recommend to delete columns in general, if you do not need this column you can set its usage mode to "none". If any process in your system reads all columns from the Account object this process will stop working after the column is removed even if the column itself is not used. 



This is why it is better to change usage mode in the column setup in the configuration. 

 

Best regards,

Angela

Show all comments

Hi,

I am trying to setup the columns to view in the relationships detail for a client but I can not see Start Date and End Date.

The fields are there in the schema but on the page, they look different (Screenshots attached).

I want to add Start Date and End Date of the relationships to the view. Please help me with this.

 

Like 0

Like

1 comments

Firstly you need to add the columns to the view VwContactRelationship. Please deploy the application locally and create a script that will modify the view. Then add the columns to the related object. Then the columns will appear in the section wizard. 

Show all comments