diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleLinksWidget.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleLinksWidget.js
index ad59e82beb37b9e1b3018e0f097d167aa0b87cc7..4324a80781c454e9d3b94688f99302ebd83bd682 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleLinksWidget.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleLinksWidget.js
@@ -440,7 +440,7 @@ function SampleLinksWidget(containerId, profile, serverFacade, title, sampleType
 			var info = $("<span>");
 			
 			var displayNameAsCode = sampleToAdd.code;
-			if(sampleToAdd.properties) {
+			if(sampleToAdd.properties && sampleToAdd.properties[profile.propertyReplacingCode]) {
 				displayNameAsCode = sampleToAdd.properties[profile.propertyReplacingCode];
 			}