Remove hyperlink on Section list view

Hi Community

 

I want to remove the hyperlink from lookup fields. To achieve this I have followed this community article. This worked fine on the edit page. But on the section list view hyperlinks are still showing as shown below.

 

 

Is there a way I can remove the hyperlink on the list view conditionally as well instead of removing the "Display value" property from the object setting?

 

 

Any lead will be appreciated.

 

Regards,

Sourav Kumar Samal

Like 0

Like

9 comments

Hi, the logic for marking columns as links on section pages is based on the method addLookupColumnLink and if you want to modify it, you need to override it. For example, in the contact section, I need to remove a link to the column "Owner". The code to do this:

 

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			addLookupColumnLink: function(item, column) {
				if (column.columnPath == "Owner"){
					console.log("We don't add link");
				} else {
					this.callParent(arguments);
				}
			}
		}
	};
});

 

Dmytro Vovchenko,

 

I have tried the above code, but the method was never called, attached a screenshot for reference.

 

 

Is there anything I am missing here?

 

Regards,

Sourav

Sourav Kumar Samal,

If you want to remove a link from a primary column the method you need in this situation is addPrimaryColumnLink

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
		]/**SCHEMA_DIFF*/,
		methods: {
			addLookupColumnLink: function(item, column) {
				if (column.columnPath == "Owner"){
					console.log("We don't add link");
				} else {
					this.callParent(arguments);
				}
			},
			addPrimaryColumnLink: function(item, column) {
				return false;
			}
		}
	};
});

Result:

Dmytro Vovchenko,

 

Is there a way to do the same thing on the dashboard list?

 

Regards,

Sourav

Sourav Kumar Samal,

In this case, look at the DashboardGridModule schema. I believe you would need to modify the same methods. But, overriding the 

DashboardGridModule is much more difficult than the section pages.

Does anybody know of a Freedom UI equivalent for doing this?

Hi Harvey,

 

In Freedom UI, on the Form page, you may remove the hyperlink from lookup fields by specifying the property "showValueAsLink": false in attributes values. 

 

As for the List page, unfortunately, there is no such possibility so far. However, our R&D team is already working on the feature that will allow turning off link generation for lookup columns of related objects, so it is expected to be implemented in future releases (no ETA yet).

 

Best regards, 

Natalia

 

 

Thanks Natalia, it's good news that there is something in the pipeline! Do you know if the solution will allow removing links for the entity itself if desired? i.e. if we have a list based over the Account entity, having it so that the Name column does not show as a link? We wouldn't want to remove that link in all cases, but in some lists it might not be wanted. For example, especially on modal lookup windows, we might want to disable the display column from being a link, as it can be confusing for users who want to select the record but click the link and get taken to the edit page instead of selecting the record.

Harvey Adcock,

 

The feature should work for both - the section list (on the List page) and the Lookup component list. It is planned that the links that lead to other entities' edit pages will be removed by default, and after enabling the feature, they will become available.

We will highlight your comments to the R&D team.
Thank you for being an active participant of the Creatio community!

Show all comments