diff --git a/entity/MarketingWorkflowLauncher_entity/entityfields/workflowlauncherintegration/children/processvariables_param/valueProcess.js b/entity/MarketingWorkflowLauncher_entity/entityfields/workflowlauncherintegration/children/processvariables_param/valueProcess.js index 3855fc6c4437fc0bdec4711441f35780dba57507..cea637a710a0e3e0903248241654aec944c88137 100644 --- a/entity/MarketingWorkflowLauncher_entity/entityfields/workflowlauncherintegration/children/processvariables_param/valueProcess.js +++ b/entity/MarketingWorkflowLauncher_entity/entityfields/workflowlauncherintegration/children/processvariables_param/valueProcess.js @@ -2,6 +2,7 @@ import("system.vars"); import("system.result"); var variables = { - documentTemplateId: vars.get("$field.DOCUMENTTEMPLATE_ID") + documentTemplateId: vars.get("$field.DOCUMENTTEMPLATE_ID"), + originUrl: vars.get("$sys.origin") }; result.string(JSON.stringify(variables)); \ No newline at end of file diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index bfd5e70a02a6311cc1ea1cd607c4abc5ac94ec69..d428c6f4de9cb19b684a64d41934233814349921 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -959,6 +959,12 @@ <tooltip>Export fields of this table</tooltip> <tooltipProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/export/tooltipProcess.js</tooltipProcess> </entityActionField> + <entityActionField> + <name>startMarketingWorkflows</name> + <title>Start marketing workflow</title> + <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + </entityActionField> </children> </entityActionGroup> <entityActionField> @@ -1422,18 +1428,6 @@ <fieldName>FilterProvider</fieldName> </dependency> </entityConsumer> - <entityActionGroup> - <name>workflowActions</name> - <title>Workflow</title> - <children> - <entityActionField> - <name>startMarketingWorkflows</name> - <title>Start marketing workflow</title> - <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/workflowactions/children/startmarketingworkflows/onActionProcess.js</onActionProcess> - <isObjectAction v="false" /> - </entityActionField> - </children> - </entityActionGroup> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Organisation_entity/entityfields/workflowactions/children/startmarketingworkflows/onActionProcess.js b/entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js similarity index 100% rename from entity/Organisation_entity/entityfields/workflowactions/children/startmarketingworkflows/onActionProcess.js rename to entity/Organisation_entity/entityfields/filterviewactiongroup/children/startmarketingworkflows/onActionProcess.js diff --git a/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod b/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod index f1640dc1aacfcbb6ebd9de2ce5afb3d6ca8b92c9..4ac6aa0edf321b11bf272474c944f35821a429e4 100644 --- a/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod +++ b/entity/WorkflowLauncher_entity/WorkflowLauncher_entity.aod @@ -31,6 +31,7 @@ <name>KEY</name> <title>Key</title> <consumer>WorkflowDefinitions</consumer> + <mandatory v="true" /> <state>EDITABLE</state> </entityField> <entityActionField> @@ -88,6 +89,7 @@ <recordContainers> <datalessRecordContainer> <name>dataLess</name> + <alias>Data_alias</alias> </datalessRecordContainer> </recordContainers> </entity> diff --git a/neonView/OrganisationFilter_view/OrganisationFilter_view.aod b/neonView/OrganisationFilter_view/OrganisationFilter_view.aod index 7f17a0e1a0f26786a54d3660f74107d1706634ad..1cbde0c53092405404ec0d317720691ca55d14e3 100644 --- a/neonView/OrganisationFilter_view/OrganisationFilter_view.aod +++ b/neonView/OrganisationFilter_view/OrganisationFilter_view.aod @@ -51,7 +51,6 @@ <name>Organisations</name> <favoriteActionGroup1>filterViewActionGroup</favoriteActionGroup1> <favoriteActionGroup2>DuplicateActions</favoriteActionGroup2> - <favoriteActionGroup3>workflowActions</favoriteActionGroup3> <subtitleField>CUSTOMERCODE_DISPLAY_fieldGroup</subtitleField> <entityField>#ENTITY</entityField> <linkedColumns> @@ -101,7 +100,6 @@ <name>Treetable</name> <favoriteActionGroup1>filterViewActionGroup</favoriteActionGroup1> <favoriteActionGroup2>DuplicateActions</favoriteActionGroup2> - <favoriteActionGroup3>workflowActions</favoriteActionGroup3> <entityField>#ENTITY</entityField> <linkedColumns> <element>NAME</element> diff --git a/process/FilterViewAction_lib/process.js b/process/FilterViewAction_lib/process.js index 8615c426d6d5e60f81b62960bf60b31a0486b776..afd89d4d6d45e7afbd01146356a20eadd053896f 100644 --- a/process/FilterViewAction_lib/process.js +++ b/process/FilterViewAction_lib/process.js @@ -40,7 +40,7 @@ FilterViewActionUtils.getUidsByEntityFilter = function (pContext, pFilter) { return new SqlBuilder() .selectDistinct("CONTACT.CONTACTID") - .from("PERSON") + .from("ORGANISATION") .join("CONTACT", newWhere("ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID").and("CONTACT.PERSON_ID is null")) .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID") .leftJoin("CLASSIFICATIONSTORAGE", "CLASSIFICATIONSTORAGE.OBJECT_ROWID = CONTACT.CONTACTID") diff --git a/process/SendEmail_workflowService/process.js b/process/SendEmail_workflowService/process.js index ded2b169e19d73aa2641f09465d43692229f95e7..14247ad4e4b3dda3ab4be65989fa896e1434a894 100644 --- a/process/SendEmail_workflowService/process.js +++ b/process/SendEmail_workflowService/process.js @@ -14,15 +14,20 @@ var recipientContactId = variables.recipientContactId || variables.targetId; var documentTemplateId = variables.documentTemplateId; var senderName = variables.senderName; var mailSubject = variables.mailSubject; +var aditoUrl = variables.originUrl; var actionParams = Utils.clone(variables); actionParams.processInstanceId = processInstanceId; -var linkPlaceholder = new Placeholder("workflowActionLink", Placeholder.types.CALLBACKFUNCTION, function () +var additionalPlaceholders = []; +if (aditoUrl) { - return WorkflowLinkActions.getActionLink("https://localhost:8443", actionParams.linkActionType, actionParams.redirectLink, actionParams); -}); + additionalPlaceholders.push(linkPlaceholder = new Placeholder("workflowActionLink", Placeholder.types.CALLBACKFUNCTION, function () + { + return WorkflowLinkActions.getActionLink(aditoUrl, actionParams.linkActionType, actionParams.redirectLink, actionParams); + })); +} -var email = Email.fromTemplate(documentTemplateId, recipientContactId, null, [linkPlaceholder]); +var email = Email.fromTemplate(documentTemplateId, recipientContactId, null, additionalPlaceholders); email.subject = mailSubject; email.toRecipients = [CommUtil.getStandardMail(recipientContactId)];