c# - 扩展 Web 服务中的 Acumatica PR203000 - 系统未能提交 EmployeeAttributes 行
问题描述
我正在尝试扩展 Acumatica 的 Web 服务端点以公开 PR 模块中的对象。我将 2021R1 与销售演示数据一起使用。我添加了一个以 PR203000 为基础的顶级实体。除了该顶级实体上的一些属性之外,我还添加了一个详细实体,该实体映射到屏幕上的 TaxSettings 选项卡。具体来说,在该详细实体中,我公开了“Tax Settings”对象的 Description、State 和 Value 属性。然后我尝试使用以下 PUT 请求添加数据:
"EmployeeID": {
"value": "KLM"
},
"TaxSettings": [
{
"State": {
"value": "FED"
},
"Description": {
"value": "Social Security Number"
},
"Value": {
"value": "123-45-6789"
}
}
]
}
但是,我收到以下错误消息:
{
"message": "An error has occurred.",
"exceptionMessage": "Operation failed",
"exceptionType": "PX.Data.PXInvalidOperationException",
"stackTrace": "..removed for brevity",
"innerException": {
"message": "An error has occurred.",
"exceptionMessage": "The system failed to commit the EmployeeAttributes row.",
"exceptionType": "PX.Data.PXException",
"stackTrace": " at PX.Api.SyImportProcessor.SyStep.CommitChangesInt(Object itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction, SyImportRowResult importResult)\r\n at PX.Api.SyImportProcessor.SyStep.CommitChanges(Object& itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction)\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()"
}
}
不幸的是,作为 Acumatica 开发的新手,我没有发现这个错误足以提供足够的信息来查明问题。我检查了相关的 Graph 和 EmployeeAttributes DAC,但无法确定可能导致问题的原因。虽然我意识到上述 JSON 调用不包含 DAC 中所需的所有字段,但据我了解,图表调用“EmployeeAttributes.SetSettingNameForDescription”来填充这些字段,因此我认为这不是问题所在。
我是 Acumatica 的新手,所以任何关于如何排除故障的指示都会非常感激。
谢谢。
解决方案
推荐阅读
- spring - Guava(Spring)中过期后如何刷新缓存中的键和值
- python - Python - matplotlib - 如何从方程中绘制平面?
- c++ - 适用于 Visual Studio 的混合
- laravel - laravel Voyager 多语言如何在需要的语言环境中显示带有翻译的项目
- rest - 使用 JavaDSL 配置到外部 URL 的 apache-camel 路由
- c# - 将数据从 GridView 保存到数据库时输入字符串格式不正确
- c# - 如何在迭代中同时中断和继续?
- json - jq - 根据其中一个值查找 JSON 对象并从中获取另一个值
- elasticsearch - Elasticsearch - 完全插入或部分更新
- javascript - 如何使用php读取本地目录中的图像并将其显示到网页中