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.