diff --git a/entity/Offer_entity/entityfields/contact_id/stateProcess.js b/entity/Offer_entity/entityfields/contact_id/stateProcess.js index e64c4d20acc8987719c1a474f96da92ddce301e4..0dcccb84c7750c4743ac3fb30a625052af4e8830 100644 --- a/entity/Offer_entity/entityfields/contact_id/stateProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/stateProcess.js @@ -3,8 +3,11 @@ import("system.result"); import("system.neon"); import("system.vars"); -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || - (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))) +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +{ result.string(neon.COMPONENTSTATE_READONLY); +} else - result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); \ No newline at end of file +{ + result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED); +} diff --git a/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js b/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js index 3080fcea47e69e82074e9a6a5d3b9951364aa7fe..aee05ab473a438d99830659e02d26be864a17c3f 100644 --- a/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js +++ b/entity/Organisation_entity/entityfields/360degreeobjects/children/objectrowid_param/valueProcess.js @@ -5,6 +5,6 @@ import("system.result"); var contactids = newSelect( "CONTACTID" ) .from("CONTACT") .where("CONTACT.ORGANISATION_ID", vars.getString("$field.ORGANISATIONID")) - .arrayColumn(); + .orderBy("CONTACT.PERSON_ID DESC").arrayColumn(); result.string( JSON.stringify(contactids) ); \ No newline at end of file