diff --git a/layouts/v7/modules/Contacts/resources/Detail.js b/layouts/v7/modules/Contacts/resources/Detail.js
index cb2a98abe5b7cea438ce314c9f242bad97bcc10a..fe6f018755179d66f9116f93236021ad3f052a93 100644
--- a/layouts/v7/modules/Contacts/resources/Detail.js
+++ b/layouts/v7/modules/Contacts/resources/Detail.js
@@ -31,7 +31,7 @@ Vtiger_Detail_Js("Contacts_Detail_Js", {}, {
 				return false;
 			}
 
-			var primaryEmailValue = primaryEmailField["0"].data("value");
+			var primaryEmailValue = primaryEmailField.data("value");
 			if (primaryEmailValue == "") {
 				app.helper.showErrorNotification({message: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER')});
 				return false;
@@ -47,4 +47,4 @@ Vtiger_Detail_Js("Contacts_Detail_Js", {}, {
 		this._super();
 		this.registerAjaxPreSaveEvents(form);
 	}
-})
\ No newline at end of file
+})