Skip to content
Snippets Groups Projects
Commit 8a0b5fc0 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

"new Contact" autoset private-dummy-org

parent 114c2eaa
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
<name>ORGANISATION_ID</name>
<title>Organisation</title>
<consumer>Organisations</consumer>
<mandatory v="true" />
<mandatory v="false" />
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/onValidation.js</onValidation>
......
import("system.vars");
import("system.neon");
//since the standard address can be only values of org the standard address has to be reset on org change
vars.set("$field.ADDRESS_ID", "");
\ No newline at end of file
vars.set("$field.ADDRESS_ID", "");
if(vars.exists("$local.value") && !vars.get("$local.value"))
{
neon.setFieldValue("$field.ORGANISATION_ID", "0");
}
......@@ -2,10 +2,7 @@ import("system.result");
import("system.vars");
import("system.neon");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.getString("$field.ORGANISATION_ID") == "")
{
if(!vars.get("$field.ORGANISATION_ID"))
{
result.string("0");
}
result.string("0");
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment