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

[Projekt: Entwicklung - Neon][TicketNr.: 1029627][Preview Kontakt: Standard-Kommunikationsadresse]

parent 55c41659
No related branches found
No related tags found
No related merge requests found
......@@ -416,11 +416,13 @@
<name>STANDARD_EMAIL_COMM</name>
<title>E-Mail</title>
<outgoingField>PersCommEmail_dfo</outgoingField>
<onValueChange>%aditoprj%/entity/Pers_entity/entityfields/standard_email_comm/onValueChange.js</onValueChange>
</entityField>
<entityField>
<name>STANDARD_PHONE_COMM</name>
<title>Phone</title>
<outgoingField>PersCommPhone_dfo</outgoingField>
<onValueChange>%aditoprj%/entity/Pers_entity/entityfields/standard_phone_comm/onValueChange.js</onValueChange>
</entityField>
<entityOutgoingField>
<name>PersCommPhone_dfo</name>
......
import("system.vars");
import("system.neon");
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
if (vars.get("$field.IMAGE"))
{
vars.set("$image.changedImage", true);
}
else
{
vars.set("$image.changedImage", "deleted");
}
FieldChanges.setChange("$field.IMAGE");
\ No newline at end of file
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
FieldChanges.setChange("$field.STANDARD_EMAIL_COMM");
\ No newline at end of file
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
FieldChanges.setChange("$field.STANDARD_PHONE_COMM");
\ No newline at end of file
import("system.vars");
import("Pers_lib");
import("Org_lib");
import("Comm_lib");
import("Entity_lib");
// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer
if (vars.exists("$image.changedImage"))
{
if (vars.get("$image.changedImage"))
{
var imageData = vars.getString("$field.IMAGE");
if (vars.get("$image.changedImage") != "deleted")
{
PersUtils.setImage(vars.get("$field.PERSID"), imageData);
}
else
{
PersUtils.removeImage(vars.get("$field.PERSID"));
}
}
}
FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){
if (state == FieldChanges.STATE_CHANGED())
PersUtils.setImage(vars.get("$field.PERSID"), value);
else
PersUtils.removeImage(vars.get("$field.PERSID"));
});
vars.set("$image.changedImage", false);
var uid = vars.get("$sys.uid");
FieldChanges.assimilateChangeAndDispose("$field.STANDARD_EMAIL_COMM", function(state, value){
CommUtil.setStandardMail(uid, value);
});
FieldChanges.assimilateChangeAndDispose("$field.STANDARD_PHONE_COMM", function(state, value){
CommUtil.setStandardPhone(uid, value);
});
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