diff --git a/entity/Order_entity/entityfields/contact_id/onValueChange.js b/entity/Order_entity/entityfields/contact_id/onValueChange.js index d0c5b9a5c46eebb0b70f5da897cd3ddd571b93ab..38d1cb778cfbcc7a0cf5d1bc0a55f142e965f213 100644 --- a/entity/Order_entity/entityfields/contact_id/onValueChange.js +++ b/entity/Order_entity/entityfields/contact_id/onValueChange.js @@ -12,6 +12,6 @@ var relData = newSelect("ISOLANGUAGE") .cell(true); if(relData) - vars.set("$field.ISOLANGUAGE", relData[0]); + vars.set("$field.ISOLANGUAGE", relData); neon.setFieldValue("$field.OBJECT_ROWID", null) \ No newline at end of file diff --git a/entity/Order_entity/entityfields/isolanguage/displayValueProcess.js b/entity/Order_entity/entityfields/isolanguage/displayValueProcess.js index 82a2b31777afebf0a66a9c841e10bc43995da5a4..8b6c8cfc0eff34a606791f571a8d2b5a62234646 100644 --- a/entity/Order_entity/entityfields/isolanguage/displayValueProcess.js +++ b/entity/Order_entity/entityfields/isolanguage/displayValueProcess.js @@ -1,15 +1,10 @@ -import("system.db"); -import("system.translate"); -import("system.result"); import("system.vars"); -import("Sql_lib"); +import("Context_lib"); +import("system.result"); + +var res = ""; +var langCode = vars.get("$field.ISOLANGUAGE"); +if (langCode) + res = ContextUtils.loadContentTitle("Language_entity", langCode); -if (vars.exists("$param.OrderLanguage_param") && vars.get("$param.OrderLanguage_param")) -{ - var latinName = newSelect("NAME_LATIN") - .from("AB_LANGUAGE") - .whereIfSet("AB_LANGUAGE.ISO3", "$param.OrderLanguage_param") - .cell(true); - - result.string(translate.text(latinName)); -} \ No newline at end of file +result.string(res); \ No newline at end of file