diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ExternalDmsSearchCriteria.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ExternalDmsSearchCriteria.js
index 7ba2a31721c3513c30e73604fc9d2b116617b6a8..7316188f553b99496248446e7ce69059c7be4ef1 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ExternalDmsSearchCriteria.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/as/dto/dataset/search/ExternalDmsSearchCriteria.js
@@ -1,7 +1,8 @@
 /**
  * @author pkupczyk
  */
-define([ "require", "stjs", "as/dto/common/search/AbstractCompositeSearchCriteria", "as/dto/common/search/CodeSearchCriteria", "as/dto/externaldms/search/LabelSearchCriteria",  "as/dto/externaldms/search/AddressSearchCriteria", "as/dto/externaldms/search/ExternalDmsTypeSearchCriteria"], function(require, stjs, AbstractCompositeSearchCriteria) {
+define([ "require", "stjs", "as/dto/common/search/AbstractCompositeSearchCriteria", "as/dto/common/search/CodeSearchCriteria", 
+		"as/dto/common/search/CodesSearchCriteria", "as/dto/externaldms/search/LabelSearchCriteria",  "as/dto/externaldms/search/AddressSearchCriteria", "as/dto/externaldms/search/ExternalDmsTypeSearchCriteria"], function(require, stjs, AbstractCompositeSearchCriteria) {
 	var ExternalDmsSearchCriteria = function() {
 		AbstractCompositeSearchCriteria.call(this);
 	};
@@ -12,6 +13,10 @@ define([ "require", "stjs", "as/dto/common/search/AbstractCompositeSearchCriteri
 			var CodeSearchCriteria = require("as/dto/common/search/CodeSearchCriteria");
 			return this.addCriteria(new CodeSearchCriteria());
 		};
+		prototype.withCodes = function() {
+			var CodesSearchCriteria = require("as/dto/common/search/CodesSearchCriteria");
+			return this.addCriteria(new CodesSearchCriteria());
+		};
 		prototype.withLabel = function() {
 			var LabelSearchCriteria = require("as/dto/externaldms/search/LabelSearchCriteria");
 			return this.addCriteria(new LabelSearchCriteria());