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

Preset Activity&Task Link in Contact

parent 93fd6c24
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
</entityField>
<entityField>
<name>ORGANISATION_ID</name>
<title>Organisation</title>
<title>Company</title>
<consumer>Organisations</consumer>
<mandatory v="false" />
<valueProcess>%aditoprj%/entity/Contact_entity/entityfields/organisation_id/valueProcess.js</valueProcess>
......
......@@ -107,6 +107,10 @@
<name>ObjectId_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/activities/children/objectid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>PresetLinks_param</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityField>
......@@ -831,6 +835,12 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<name>USER_NEW_CONTACT</name>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/user_new_contact/valueProcess.js</valueProcess>
</entityField>
<entityParameter>
<name>AdditionalActivityLinks_param</name>
<title></title>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/additionalactivitylinks_param/valueProcess.js</valueProcess>
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.result");
import("system.vars");
var links = vars.get("$param.AdditionalActivityLinks_param");
result.string(links);
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.vars");
var links = [];
if (vars.get("$field.ORGANISATION_ID"))
links.push(["Organisation", vars.get("$field.ORGANISATION_ID")]);
links = JSON.stringify(links);
result.string(links);
\ No newline at end of file
import("system.vars");
import("ActivityTask_lib");
ActivityUtils.createNewActivity(vars.getString("$field.CONTACTID"));
\ No newline at end of file
var links = vars.get("$param.AdditionalActivityLinks_param");
links = JSON.parse(links);
ActivityUtils.createNewActivity(vars.getString("$field.CONTACTID"), links);
\ 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