将实体绑定到odata操作?

2020-08-14 15:07发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)当我从列表中选择一个项目时,我正...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


当我从列表中选择一个项目时,我正在尝试执行更新odata操作。 我知道该项目已绑定到页面

 {
 "属性":{
 " IsActive":" true"
 },
 "目标":{
 " EntitySet":" CompanyProfiles",
 " ReadLink":" {@ odata.readLink}",
 "服务":"/img/DOEDocumentMonitoring/Services/DOEDocumentMonitoring.service"
 },
 " _Type":" Action.Type.ODataService.UpdateEntity"
 }

 

这是mu update odata操作。 如何将所选项目绑定到此? 是否需要在查询选项中传递ID,例如" $ filter = Id eq?" ? 在这里我该怎么做? 当前,当我执行它时,我得到一个错误:

错误:查询应该只返回一个实体。 它返回了4 

我认为发生的是odata操作正在尝试更新所有4个项目,因此我应该以某种方式将所选项目绑定到该操作。

5条回答
悠然的二货
2020-08-14 15:59

比尔,

这是console.log的示例输出:

对象表名称{" @ odata.type":"#default.CompanyProfile"," @ odata.editLink":" CompanyProfiles(9L)"," @ odata.id":" CompanyProfiles(9L)","  @ odata.readLink":" CompanyProfiles(9L)"," Address":2," BusinessType":null," ContactNumber":" 7777-8888"," DtiNumber":null," EmailAddress":null," EmailSentDate"  :null," FaxNumber":null," Id":9," IsActive":null," MainRepresentative":null," Name":" DOE Gas company"," SecNumber":null," SpecifyNumber":null," 状态":" OK!"," TinNumber":null," TradeName":null,"版本":1,"网站":null," CompanyProfileJointVentureDetails":[]," CompanyProfileJointVentureDetails1":[]," CompanyProfileProductTypeDetails":  []} 

当然,当我按列表中的其他项目时,数据将有所不同。 另外,我已经发送了元数据,感谢您抽出宝贵的时间对此进行回复。

一周热门 更多>