SAP Cloud for Customer使用工作流(workflow)实现邮件自动通知功能

简介: SAP Cloud for Customer使用工作流(workflow)实现邮件自动通知功能

In release 1708 the Recipient Determination to “Reporting Line Manager” in Opportunity is available:

image.png

However for Account application, there are only six available determination rules available in standard.

image.png

Suppose we need to support the following scenario:


Max is Jerry’s manager. When Jerry has changed a given kind of Account in system, Max will get an email notification triggered by workflow. The general idea to fulfill this requirement is to introduce a logic which could automatically make Max as one member in Account Team table in Account TI by a small development in Cloud Application Studio, so that the existing functionality provided by Workflow framework could be leveraged to send notification.


Here below is the solution.


(1) Create a new custom Party Role Code and define it as Recipient determination in Workflow rule edit UI by following this blog Custom recipient determination in workflow rule done on Account BO.

Of course you can also use standard role code.


image.png

(2) Create a beforeSave script file on Root node of Customer Business Object:

image.png

The idea of this code: first check whether the line manager is already maintained as one member of current Account team ( in this example I use a custom Party Role Code ZJE to represent Line Manager role ), if not, then query the corresponding line manager of current logon user and create a new Account team member dynamically.

In the runtime, the behavior is that once Jerry creates a new account, Jerry’s manager Max will automatically become as one Account Team member and received a notification Email:

image.png


相关文章
|
17天前
|
Java BI API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
SAP Cloud for Customer 里如何通过 ABSL 二次开发方式消费 SAP S/4HANA 系统的 API
14 0
SAP Cloud for Customer使用工作流(workflow)实现邮件自动通知功能
SAP Cloud for Customer使用工作流(workflow)实现邮件自动通知功能
SAP Cloud for Customer使用工作流(workflow)实现邮件自动通知功能
如何自动完成登录 SAP BTP workflow(工作流) 管理应用 Launchpad 所需的设置
如何自动完成登录 SAP BTP workflow(工作流) 管理应用 Launchpad 所需的设置
151 0
如何自动完成登录 SAP BTP workflow(工作流) 管理应用 Launchpad 所需的设置
SAP C4C工作流(Workflow)接收方自动决定的一个例子
SAP C4C工作流(Workflow)接收方自动决定的一个例子
SAP C4C工作流(Workflow)接收方自动决定的一个例子
|
Web App开发 前端开发 JavaScript
SAP Fiori 页面的周期性动态刷新功能的实现步骤
SAP Fiori 页面的周期性动态刷新功能的实现步骤
SAP Fiori 页面的周期性动态刷新功能的实现步骤
|
API 微服务
如何使用 SAP Kyma 控制台手动发送 SAP Commerce Cloud Mock 应用暴露的事件
如何使用 SAP Kyma 控制台手动发送 SAP Commerce Cloud Mock 应用暴露的事件
123 0
如何使用 SAP Kyma 控制台手动发送 SAP Commerce Cloud Mock 应用暴露的事件
SAP S/4HANA生产订单创建之后,为什么会自动执行action
SAP S/4HANA生产订单创建之后,为什么会自动执行action
86 0
SAP S/4HANA生产订单创建之后,为什么会自动执行action
|
Go
SAP S/4HANA里如何创建Customer主数据以及执行后续处理
SAP S/4HANA里如何创建Customer主数据以及执行后续处理
151 0
如何在SAP Cloud for Customer里开发具有依赖关系的互动下拉列表
如何在SAP Cloud for Customer里开发具有依赖关系的互动下拉列表
如何在SAP Cloud for Customer里开发具有依赖关系的互动下拉列表
SAP CRM One Order的事件注册机制
There are huge number of function modules which are called in one order runtime as event callback. If you want to research by yourself, set a breakpoint on the function module below, which is a central entry point to call event handler function module:
98 0
SAP CRM One Order的事件注册机制