diff --git a/entity/CampaignStep_entity/CampaignStep_entity.aod b/entity/CampaignStep_entity/CampaignStep_entity.aod index 6a6eb3fc7f1ac69cfbc4adc248122e30326a8439..99019821d99d4e534c1a2365444d3c26ae8fcb50 100644 --- a/entity/CampaignStep_entity/CampaignStep_entity.aod +++ b/entity/CampaignStep_entity/CampaignStep_entity.aod @@ -335,6 +335,7 @@ <consumer>CampaignStepsConsumer</consumer> <textInputAllowed v="true" /> <stateProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/predecessorstep_id/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/predecessorstep_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/predecessorstep_id/displayValueProcess.js</displayValueProcess> <onValueChange>%aditoprj%/entity/CampaignStep_entity/entityfields/predecessorstep_id/onValueChange.js</onValueChange> <onValueChangeTypes> @@ -402,6 +403,17 @@ <name>maxSort_param</name> <expose v="true" /> </entityParameter> + <entityActionField> + <name>newCampaignStep</name> + <title>New step</title> + <onActionProcess>%aditoprj%/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js</onActionProcess> + <iconId>NEON:GROUP_APPOINTMENT</iconId> + </entityActionField> + <entityParameter> + <name>predecessorstepId_param</name> + <expose v="true" /> + <documentation>%aditoprj%/entity/CampaignStep_entity/entityfields/predecessorstepid_param/documentation.adoc</documentation> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js b/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..0c0f7ed6eae7bfa476f1bc34efa2cbf3bc0c2644 --- /dev/null +++ b/entity/CampaignStep_entity/entityfields/newcampaignstep/onActionProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.neon"); + +neon.openContext("CampaignStep", "CampaignStepEdit_view", null, neon.OPERATINGSTATE_NEW, { + campaignId_param: vars.get("$param.campaignId_param"), + predecessorstepId_param: vars.get("$field.CAMPAIGNSTEPID") +}); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/predecessorstep_id/valueProcess.js b/entity/CampaignStep_entity/entityfields/predecessorstep_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..db810fb207600871122ec9f8969de384ee89d8b3 --- /dev/null +++ b/entity/CampaignStep_entity/entityfields/predecessorstep_id/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.result"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$param.predecessorstepId_param")) + result.string(vars.get("$param.predecessorstepId_param")); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/predecessorstepid_param/documentation.adoc b/entity/CampaignStep_entity/entityfields/predecessorstepid_param/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..ebcd2606b5895da2c2ad6351aac93f11d46e490b --- /dev/null +++ b/entity/CampaignStep_entity/entityfields/predecessorstepid_param/documentation.adoc @@ -0,0 +1 @@ +An optional CAMPAIGNSTEP.PREDECESSOR_ID which is used as presetValue for the predecessor-step-field. \ No newline at end of file