diff --git a/entity/InterestLink_entity/entityfields/interest_id/onValidation.js b/entity/InterestLink_entity/entityfields/interest_id/onValidation.js index 834f73d13356a293cfafae324137a69c5f013b5a..8688ac8a3ba5a00ecda291098512ba68049328f0 100644 --- a/entity/InterestLink_entity/entityfields/interest_id/onValidation.js +++ b/entity/InterestLink_entity/entityfields/interest_id/onValidation.js @@ -6,12 +6,12 @@ import("Sql_lib"); if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$local.value") && vars.get("$field.CONTACT_ID")) { - var isParticipant= newSelect(["INTEREST_ID"]) + var interest = newSelect(["INTEREST_ID"]) .from("INTERESTLINK") .where("INTERESTLINK.INTEREST_ID", vars.get("$field.INTEREST_ID")) .and("INTERESTLINK.CONTACT_ID",vars.get("$field.CONTACT_ID")) .cell(); - if (isParticipant){ + if (interest){ result.string(translate.text("Interest already assign to contact")); } } \ No newline at end of file