使用SAP C4C自定义BO实现自定义的Number Range
My series of Cloud Application Studio BlogsHow to detect EditMode in an Embedded ComponentStep by step to enable your custom BO with attachment upload functionalityStep by step to create an Adobe Prin
SAP C4C,CRM和S4HANA的Saved Query使用介绍
Saved query is a feature which enables customer to customized query according to their special business requirement.Saved Query in C4CIn C4C suppose I would like to make the value help for UI field “c
SAP Cloud for Customer里一个Promise的实际应用场合
There are lots of tutorials about promise in the internet.Recently I am studying the frontend code of SAP Cloud for Customer and I come across a real example of how promise is used there. Be
SAP Cloud for Customer的HTML Mashup渲染原理
HTMLContainer:sHtmlContent就是之前在SAP C4C mashup编辑页面维护的html代码:MashupServerUri:"https://mashup-cn.sapbydesignmashups.cn""https://mashup-cn.sapbydesignmashups.cn/mashups/html/container.html&
如何在postman里为类型为Edm.DateTime的OData参数指定正确格式的值
我在调用SAP C4C的OData服务时,发现很多EntityType的字段类型都为Edm.DateTime.比如SAP C4C Lead OData服务里Lead entity Type的StartDate字段和EndDate字段。如果我想用Postman调用OData服务创建Lead,像这种类型的参数,应该如何维护输入值?如果请求正文的格式是json,则使用如下的格式维护类型为Edm.Date
如何将bing搜索页面以HTML Mashup的方式嵌入到SAP C4C页面
创建一个HTML mashup,port binding选择Lead Info:在Mashup编辑页面里,指定type为url,输入bing搜索的网址,将查询参数绑定到LeadID上:用key user tool定位到想要添加Mashup的View上去,点击Add Mashup,添加HTML到页面:默认的HTML Mashup位于屏幕偏左的列之内,将其拖拽到Full width区域内:调整宽度之后
SAP Cloud for Customer的inscreen_dataflow处理方式
点击Sales Lead OWL里某一个Lead,进入TI页面:TI页面里创建了一个Embedded Component:aTargets的内容:从上图可以看出这个navigation是从Lead TI页面screen内部,通过PublicOutportECLeadProduct到达Embedded Component.在NavigationProcessor里有个方法inscreen_dataf
如何在SAP Cloud for Customer页面嵌入自定义UI
最近Jerry所在的团队在做一个智能名片的项目,销售代表可以使用微信小程序创建智能名片,发布一些促销信息,分享到微信平台上(朋友圈或微信群)。点击名片的人可以浏览该销售负责售卖的商品,查看商品的参数等各种明细信息,并可以同名片绑定的智能机器人进行简单的对话,询问本次促销活动的更多信息。假设一位汽车销售负责销售如下三款汽车,这些汽车作为产品主数据维护在C4C系统中。汽车销售在智能名片的微信小程序里基
SAP C4C里没有选择Port binding的url Mashup行为分析
下图这个Mashup无法在HTML和url之间切换,说明其类型为url Mashup.没有选择port binding:也就意味着除了系统默认的几个字段之外,再无其他可以的输入参数供该Mashup绑定。仅有$System这个结构下的字段可供绑定。我将$System的EmployeeID字段绑定到bing查询的query字段里。这样,当我将该Mashup配置到UI上时,点击该超链接,会自动弹出bin
如何将SAP C4C TI页面的值传递到Embedded Component里去
先看最后达到的效果,下图蓝色矩形框是我自开发的UI,里面的ID 25234来自C4C标准的Lead UI里的Lead ID。这个值是如何从Lead Thing Inspector UI传递到Embedded Component的input field里的呢?新建一个Embedded Component,data model标签页里,选择Lead这个标准的BO. 创建一个Data field Lea
在SAP C4C TI(Thing Inspector)页面里添加自定义UI
SAP C4C的自开发UI可以放到Embedded Component里去,如下图所示,在Cloud Application Studio里创建一个新的Embedded Component:我在这个自开发页面里就放了一个input field:如果想把包含了这个input field的Embedded Component放到Sales Lead的TI页面去,UI designer里切换到Exten
SAP C4C HTML Mashup initializePane方法里的Inport和Navigation处理
在Cloud Application Studio里创建的HTML mashup,保存到C4C后台后,其元数据再被读取到前端消费,格式如下:我在C4C UI上指定的Mashup参数,URL的值如下:成功解析出input为Lead_Info_In:没有按照我期望的情形进行执行:MashupHTMLContainer.prototype.initializePane = funct
SAP Cloud for Customer里新的Lead UI对Mashup集成的支持原理
我们在SAP Cloud for Customer UI里可以看见Lead和SalesLead两个UI,其中后者被SAP标记为deprecated状态:Leads才是SAP推荐使用的UI,Lead TI页面的模型路径:app.component=/BYD_COD/SalesOnDemand/Marketing/Prospect/COD_Mkt_Prospect.TI.uicomponent&
SAP C4C Mashup port bindingF4帮助对话框里的数据源
我们在SAP Cloud for Customer上创建Mashup时,会选择port binding:点了F4之后,看到的这些列表里的数据:从Chrome开发者工具里能观察到这些数据是通过HTTP请求从后台返回的:选中Lead_Info后:能看到Lead_Info这个inport提供的所有字段,这些字段又是另外一个HTTP调用取回的,其响应如下:
SAP C4C url mashup跳转原理 - C4C UI到Mashup的参数传递是如何进行的
点击url后,navigationProcessor负责这次跳转:oTarget变量内容如下:使用ControllerFactory创建Embedded Component:在navigationProcessor里有一个专门的方法用于处理inscreen_dataflow:screen到Embedded Component的跳转,当然是方法_inscreenToEC完成:在这个方法里,拿到inp
如何创建SAP C4C Product list并用OData服务消费
SAP Cloud for Customer里的product list创建:我创建一个ID为161的product list,维护三个product进去:三个product ID如下:找到该product list对应的UI:COD_ProductList_OWL这个UI对应的后台BO为ProductBusinessPartnerRelation:新建一个C4C OData服务,取名produc
SAP C4C OData服务的filter,客户端分页和排序的使用方式
假设系统里已经有许多的Lead历史数据,而我们正在进行的微信小程序和C4C集成的项目里,又创建了许多新的Lead数据。如何将这些新的在微信小程序里调用OData服务创建的Lead数据同老的历史数据做区分呢?(1) 在C4C Sales Lead页面里,通过Source字段来标明Lead的来源。对于AI Card项目来说,所有的Lead经由微信小程序创建,因此调用OData API时,SourceC
如何使用SAP Cloud for Customer OData服务创建Lead
一共需要两次OData消费来创建Lead.# 请求1url:https://<host>.cn/sap/c4c/odata/v1/c4codata/LeadCollection/$countHTTP GET,basic Authorization:HTTP头部字段,x-csrf-token维护为fetch:在Postman里执行该请求,在响应里拿到服务器颁发的csrf token:hJ
SAP C4C的URL Mashup无法添加到embedded component里去
HTML帮助文档里写到:URL Mashup只能添加到headers上,无法添加到sections和tab区域里。测试:在adaptation模式下,headers区域下的Mashup列表里选择url Mashup:在properties的Apperance里只有Link一个选项,且无法更改:如果试图将url Mashup添加到embedded component里,会遇到下图的提示消息:the
SAP Cloud for Customer的Mashup位于CustomPane里
CustomPane.js的实现位置:sap/client/basecontrols/core:根据C4C系统里创建的Mashup模型来初始化CustomPane控件:oModel.oResource的id就是该Mashup在C4C系统的ID:MashupComponentModel.js的实现:路径:SAP_UI/HTML5/resources/sap/client/mashup/common/