Lookup to be displayed as a link inside an Editable list

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 0

Like

2 comments
Best reply

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.

Thank you Bhoobalan Palanivelu,

 

It works perfectly.

Show all comments