Hello Creatio Community,
I have an editable list, and I want that one of its columns "Product" be displayed as a link. So that when its clicked it redirects automatically to the Product section.
How can this functionality be achieved ?
Does this involve overriding the addColumnLink: function ?
Thank you,
Petrika
Like
Hi Petrika,
The below code will make the lookup column act as a link as to how it inherits the behaviours during a normal detail.
This is the actual logic to make the lookup a link in the detail Grid (Editable detail).
if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP{
config.showValueAsLink = true;
}
Add this method in your corresponding detail code,
getCellControlsConfig: function(entitySchemaColumn) { debugger; if (!entitySchemaColumn) { return; } var columnName = entitySchemaColumn.name; var enabled = (entitySchemaColumn.usageType !== this.Terrasoft.EntitySchemaColumnUsageType.None) && !this.Ext.Array.contains(this.systemColumns, columnName); var config = { itemType: this.Terrasoft.ViewItemType.MODEL_ITEM, name: columnName, labelConfig: {visible: false}, caption: entitySchemaColumn.caption, enabled: enabled }; if (columnName === "MyColumn") { config.enabled = false; } if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP{ config.showValueAsLink = true; } if (entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.DATE_TIME && entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.BOOLEAN) { config.focused = {"bindTo": "Is" + columnName + "Focused"}; } return config; },
BR,
Bhoobalan Palanivelu.
Hi Petrika,
The below code will make the lookup column act as a link as to how it inherits the behaviours during a normal detail.
This is the actual logic to make the lookup a link in the detail Grid (Editable detail).
if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP{
config.showValueAsLink = true;
}
Add this method in your corresponding detail code,
getCellControlsConfig: function(entitySchemaColumn) { debugger; if (!entitySchemaColumn) { return; } var columnName = entitySchemaColumn.name; var enabled = (entitySchemaColumn.usageType !== this.Terrasoft.EntitySchemaColumnUsageType.None) && !this.Ext.Array.contains(this.systemColumns, columnName); var config = { itemType: this.Terrasoft.ViewItemType.MODEL_ITEM, name: columnName, labelConfig: {visible: false}, caption: entitySchemaColumn.caption, enabled: enabled }; if (columnName === "MyColumn") { config.enabled = false; } if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP{ config.showValueAsLink = true; } if (entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.DATE_TIME && entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.BOOLEAN) { config.focused = {"bindTo": "Is" + columnName + "Focused"}; } return config; },
BR,
Bhoobalan Palanivelu.