前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何将SAP Cloud for Customer的扩展字段放置到Embedded Component中

如何将SAP Cloud for Customer的扩展字段放置到Embedded Component中

作者头像
Jerry Wang
发布2020-08-31 10:18:03
1.1K0
发布2020-08-31 10:18:03
举报

My series of Cloud Application Studio Blogs

  • How to detect EditMode in an Embedded Component
  • Step by step to enable your custom BO with attachment upload functionality
  • Step by step to create an Adobe Print form in Cloud application Studio
  • How to render PDF which displays picture from the image attachment of your custom BO
  • How to get current logged on business user’s employee information and assigned organization unit via ABSL
  • How to implement dynamic access control based on custom BO using OWL
  • How to make Code List Restriction work when control field and restricted field are not on the same BO
  • How to implement custom number range using custom business object
  • Two approaches to create Code List in Cloud Studio
  • Create Dynamic Code List via Custom Business Object Association
  • Step by step to develop Thing Type based navigation and BO Object based navigation
  • Put Extension field into embedded component and make it visible in Standard UI
  • One possible cause that embedded component fails to display in UI
  • Step by step to create HTML Mashup and make it visible in UI
  • Step by step to enable Text Collection for your custom BO
  • Automatically send an Email notification to line manager via Workflow in Account application
  • Step by step to create Object Value Selector in Cloud Application Studio

Requirement

Create extension field , put it to a given embedded component and finally make it visible in standard UI.

(1) Create an extension field on Opportunity root node and implement an action to calculate whether the current opportunity is over due:

The check logic for over due is simply based on the comparison between current system date and closed date maintained in opportunity header.

代码语言:javascript
复制
import ABSL;
var current = Context.GetCurrentGlobalDateTime( ).GetDate();
var close = this.SalesForecast.ExpectedProcessingDatePeriod.EndDate;
this.IsOverDue = current.GreaterThan(close);

(2) Create a new embedded component OppEC, create two data field and bind them to standard BO field ID and extension field IsOverDue.

Create a checkbox UI element in the embedded component and bind it to ID field. Create a button in order to execute OverdueCheck action.

Switch to embedded component’s controller tab, create an unbound data field OpportunityID, and use it as BOOperation Read’s parameter. This unbound data filled will be filled with values passed from inport to be created soon.

Create an inport and declare the parameter bound to OpportunityID.

Assign the created event handler to OnFire attribute of this inport.

Create another event handler overDueCheck and bind the BO action OverdueCheck whose implementation is done by our ABSL code.

(3) Add the embedded component to Opportunity TI overview tab,

and bind the parameter defined in standard outport to the parameter declared in my custom inport in embedded component OppEC:

Now we could test in UI: select an opportunity whose close date is yesterday, and click check button:

After that the is Overdue check box is set as selected, meantime we could observe the corresponding roundtrip from Chrome development tool which indicates the due check is done successfully with due indicator marked as X:

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-30 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • My series of Cloud Application Studio Blogs
  • Requirement
相关产品与服务
Cloud Studio(云端 IDE)
Cloud Studio(云端 IDE)是基于浏览器的集成式开发环境,为开发者提供了一个稳定的云端工作站。用户在使用 Cloud Studio 时无需安装,随时随地打开浏览器即可使用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档