D365FO更新记录的补丁方法
D365FO patch method to update Records
我正在尝试使用如下的 Patch 方法更新 D365FO 中的数据值。
https://<URL>/data/DXCGeneralJournalAccountEntries(GeneralJournalAccountEntryRecId = 5637144584)
Body: {
"DXCAdeptiaProcessed": "2019-01-01T00:00:00Z"
}
我得到的错误代码是
{
"Message": "No HTTP resource was found that matches the request URI
'/data/DXCGeneralJournalAccountEntries(GeneralJournalAccountEntryRecId = 5637144584)'. No route data was found for this request." }
你能说说为什么会出现这个错误吗?
您尝试更新的实体似乎是一个自定义实体,它可能尚未在 REST OData 中公开 API。
如果您向 /Metadata/Entities
提交 GET 请求,您应该能够在结果中找到该实体。在这里您可以检查该实体的属性,它应该看起来像这样:
{
"Name": "DXCGeneralJournalAccountEntries",
"PublicEntityName": "DXCGeneralJournalAccountEntries",
"PublicCollectionName": "DXCGeneralJournalAccountEntries",
"LabelId": "@SYS999999",
"DataServiceEnabled": true,
"DataManagementEnabled": true,
"EntityCategory": "Master",
"IsReadOnly": false
},
否则文档可能有助于公开实体:https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata#exposing-odata-entities
您是否尝试过将 ' 放在您正在使用的标识符周围?
(GeneralJournalAccountEntryRecId = '5637144584')
我正在尝试使用如下的 Patch 方法更新 D365FO 中的数据值。
https://<URL>/data/DXCGeneralJournalAccountEntries(GeneralJournalAccountEntryRecId = 5637144584)
Body: {
"DXCAdeptiaProcessed": "2019-01-01T00:00:00Z"
}
我得到的错误代码是
{ "Message": "No HTTP resource was found that matches the request URI '/data/DXCGeneralJournalAccountEntries(GeneralJournalAccountEntryRecId = 5637144584)'. No route data was found for this request." }
你能说说为什么会出现这个错误吗?
您尝试更新的实体似乎是一个自定义实体,它可能尚未在 REST OData 中公开 API。
如果您向 /Metadata/Entities
提交 GET 请求,您应该能够在结果中找到该实体。在这里您可以检查该实体的属性,它应该看起来像这样:
{
"Name": "DXCGeneralJournalAccountEntries",
"PublicEntityName": "DXCGeneralJournalAccountEntries",
"PublicCollectionName": "DXCGeneralJournalAccountEntries",
"LabelId": "@SYS999999",
"DataServiceEnabled": true,
"DataManagementEnabled": true,
"EntityCategory": "Master",
"IsReadOnly": false
},
否则文档可能有助于公开实体:https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata#exposing-odata-entities
您是否尝试过将 ' 放在您正在使用的标识符周围?
(GeneralJournalAccountEntryRecId = '5637144584')